workflow: try yet another way to cache
This commit is contained in:
parent
47e5c5cd77
commit
4d7f5a6e89
1 changed files with 22 additions and 6 deletions
28
.github/workflows/build-machines-and-homes.yml
vendored
28
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -73,9 +73,18 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
nix copy -j8 \
|
derivations=()
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
while IFS=$'\n' read derivation; do
|
||||||
$(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/')
|
derivations+=("$derivation")
|
||||||
|
done < <(nix path-info --recursive --derivation "$package")
|
||||||
|
|
||||||
|
for derivation in "${derivations[@]}"; do
|
||||||
|
cache+=(
|
||||||
|
)
|
||||||
|
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
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -132,6 +141,13 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
nix copy -j8 \
|
derivations=()
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
while IFS=$'\n' read derivation; do
|
||||||
$(nix path-info --recursive --derivation "$package" |sed 's/\.drv$/.drv^*/')
|
derivations+=("$derivation")
|
||||||
|
done < <(nix path-info --recursive --derivation "$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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue