workflow: no recursive and temp no always()
This commit is contained in:
parent
4d7f5a6e89
commit
96011436f7
1 changed files with 4 additions and 6 deletions
10
.github/workflows/build-machines-and-homes.yml
vendored
10
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -70,17 +70,15 @@ jobs:
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
if: always()
|
# if: always()
|
||||||
run: |
|
run: |
|
||||||
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
derivations=()
|
derivations=()
|
||||||
while IFS=$'\n' read derivation; do
|
while IFS=$'\n' read derivation; do
|
||||||
derivations+=("$derivation")
|
derivations+=("$derivation")
|
||||||
done < <(nix path-info --recursive --derivation "$package")
|
done < <(nix path-info --derivation "$package")
|
||||||
|
|
||||||
for derivation in "${derivations[@]}"; do
|
for derivation in "${derivations[@]}"; do
|
||||||
cache+=(
|
|
||||||
)
|
|
||||||
nix copy -j8 \
|
nix copy -j8 \
|
||||||
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
--to 's3://nixcache?endpoint=s3.cy7.sh&secret-key=/home/runner/cache-priv-key.pem' \
|
||||||
$(nix-store --query --requisites --include-outputs "$derivation")
|
$(nix-store --query --requisites --include-outputs "$derivation")
|
||||||
|
@ -138,13 +136,13 @@ jobs:
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
if: always()
|
# if: always()
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
derivations=()
|
derivations=()
|
||||||
while IFS=$'\n' read derivation; do
|
while IFS=$'\n' read derivation; do
|
||||||
derivations+=("$derivation")
|
derivations+=("$derivation")
|
||||||
done < <(nix path-info --recursive --derivation "$package")
|
done < <(nix path-info --derivation "$package")
|
||||||
|
|
||||||
for derivation in "${derivations[@]}"; do
|
for derivation in "${derivations[@]}"; do
|
||||||
nix copy -j8 \
|
nix copy -j8 \
|
||||||
|
|
Loading…
Add table
Reference in a new issue