woodpecker-plugin-nix-attic/.woodpecker/ci.yaml
Gabor Pihaj 6f919c5237
build!: cache attic client and remove "latest" flake output (#18)
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>
2023-11-30 23:23:51 +00:00

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