diff --git a/.woodpecker/ci.yaml b/.woodpecker/ci.yaml index 364dfa7..3a6ecf2 100644 --- a/.woodpecker/ci.yaml +++ b/.woodpecker/ci.yaml @@ -16,10 +16,13 @@ steps: binary_cache_token: from_secret: attic_token script: | - nix build .#woodpecker-plugin-nix-attic-latest + nix build nix-env -iA nixpkgs.docker-client - # "persist" the generated image in the workspace - cp $(realpath result) docker-image-latest - docker load -i docker-image-latest + # 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 diff --git a/flake.nix b/flake.nix index 986dd4a..21dae98 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ mkImage = import ./mkImage.nix {inherit pkgs entrypoint;}; in { 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"; }; }