workflow: try yet another way to cache
This commit is contained in:
parent
47e5c5cd77
commit
1537fd6444
2 changed files with 32 additions and 11 deletions
13
.github/workflows/build-packages.yml
vendored
13
.github/workflows/build-packages.yml
vendored
|
@ -61,9 +61,16 @@ jobs:
|
|||
- name: cache result
|
||||
if: always()
|
||||
run: |
|
||||
nix copy -j8 \
|
||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||
$(nix path-info --recursive --derivation "${{ matrix.package }}" |sed 's/\.drv$/.drv^*/')
|
||||
derivations=()
|
||||
while IFS=$'\n' read derivation; do
|
||||
derivations+=("$derivation")
|
||||
done < <(nix path-info --derivation "${{ matrix.package }}")
|
||||
|
||||
for derivation in "${derivations[@]}"; do
|
||||
nix copy -j8 \
|
||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||
$(nix-store --query --requisites --include-outputs "$derivation")
|
||||
done
|
||||
|
||||
- name: prepare tarball to upload
|
||||
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue