
Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/18 Co-authored-by: Gabor Pihaj <gabor.pihaj@gmail.com> Co-committed-by: Gabor Pihaj <gabor.pihaj@gmail.com>
28 lines
872 B
YAML
28 lines
872 B
YAML
when:
|
|
- event: pull_request
|
|
- event: push
|
|
branch: main
|
|
|
|
steps:
|
|
build:
|
|
when:
|
|
- event: pull_request
|
|
- event: push
|
|
branch: main
|
|
image: git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic
|
|
settings:
|
|
binary_cache: https://cache.nix.vdx.hu/private
|
|
binary_cache_public_key: private:O0/Z0BQZpKKHQQES65u7xNfZF7eCZoz9RKJi191TGaM=
|
|
binary_cache_token:
|
|
from_secret: attic_token
|
|
script: |
|
|
nix build
|
|
nix-env -iA nixpkgs.docker-client
|
|
# load the generated image into docker
|
|
docker load -i result
|
|
|
|
# cache attic-client as there might be a new build in this container
|
|
attic login attic $PLUGIN_BINARY_CACHE $PLUGIN_BINARY_CACHE_TOKEN
|
|
attic push private $(nix path-info .#attic-client)
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|