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>
This commit is contained in:
parent
2bf013c916
commit
6f919c5237
2 changed files with 8 additions and 5 deletions
|
@ -16,10 +16,13 @@ steps:
|
||||||
binary_cache_token:
|
binary_cache_token:
|
||||||
from_secret: attic_token
|
from_secret: attic_token
|
||||||
script: |
|
script: |
|
||||||
nix build .#woodpecker-plugin-nix-attic-latest
|
nix build
|
||||||
nix-env -iA nixpkgs.docker-client
|
nix-env -iA nixpkgs.docker-client
|
||||||
# "persist" the generated image in the workspace
|
# load the generated image into docker
|
||||||
cp $(realpath result) docker-image-latest
|
docker load -i result
|
||||||
docker load -i docker-image-latest
|
|
||||||
|
# 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:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
mkImage = import ./mkImage.nix {inherit pkgs entrypoint;};
|
mkImage = import ./mkImage.nix {inherit pkgs entrypoint;};
|
||||||
in {
|
in {
|
||||||
packages.x86_64-linux.default = mkImage null;
|
packages.x86_64-linux.default = mkImage null;
|
||||||
packages.x86_64-linux.woodpecker-plugin-nix-attic-latest = mkImage "latest";
|
packages.x86_64-linux.attic-client = pkgs.attic-client;
|
||||||
packages.x86_64-linux.woodpecker-plugin-nix-attic-release = mkImage "0.1.1";
|
packages.x86_64-linux.woodpecker-plugin-nix-attic-release = mkImage "0.1.1";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue