workflow: always() cache

This commit is contained in:
cy 2025-03-17 21:38:31 -04:00
parent 54af66d26c
commit d50d2dcb73
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
2 changed files with 14 additions and 5 deletions

View file

@ -42,10 +42,11 @@ jobs:
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
- run: nix build -L ${{ matrix.package }}
- name: cache result
if: always()
run: |
derivation="$(nix path-info --derivation "${{ matrix.package }}")"
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
attic push main --stdin <<< "$cache"
xargs attic push main <<< "$cache"
- name: prepare tarball to upload
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
- name: upload result