File tree Expand file tree Collapse file tree 3 files changed +43
-17
lines changed
actions/nix-install-ephemeral Expand file tree Collapse file tree 3 files changed +43
-17
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,13 @@ runs:
1212 uses : aws-actions/configure-aws-credentials@v4
1313 if : ${{ inputs.push-to-cache == 'true' }}
1414 with :
15- role-to-assume : ${{ secrets .DEV_AWS_ROLE }}
15+ role-to-assume : ${{ env .DEV_AWS_ROLE }}
1616 aws-region : " us-east-1"
1717 output-credentials : true
18- role-duration-seconds : 18000
18+ role-duration-seconds : 7200
1919 - name : Setup AWS credentials for Nix
2020 if : ${{ inputs.push-to-cache == 'true' }}
21+ shell : bash
2122 run : |
2223 sudo -H aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
2324 sudo -H aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
@@ -26,13 +27,15 @@ runs:
2627 sudo -E python -c "import os; file = open('/etc/nix/nix-secret-key', 'w'); file.write(os.environ['NIX_SIGN_SECRET_KEY']); file.close()"
2728 cat << 'EOF' | sudo tee /etc/nix/upload-to-cache.sh > /dev/null
2829 #!/usr/bin/env bash
29- set -euf
30+ set -euo pipefail
31+ set -f
32+
3033 export IFS=' '
3134 /nix/var/nix/profiles/default/bin/nix copy --to 's3://nix-postgres-artifacts?secret-key=/etc/nix/nix-secret-key' $OUT_PATHS
3235 EOF
3336 sudo chmod +x /etc/nix/upload-to-cache.sh
3437 env :
35- NIX_SIGN_SECRET_KEY : ${{ secrets .NIX_SIGN_SECRET_KEY }}
38+ NIX_SIGN_SECRET_KEY : ${{ env .NIX_SIGN_SECRET_KEY }}
3639 - name : Install nix
3740 uses : cachix/install-nix-action@v31
3841 with :
Original file line number Diff line number Diff line change @@ -16,19 +16,10 @@ permissions:
1616
1717jobs :
1818 nix-eval :
19- runs-on : blacksmith-32vcpu-ubuntu-2404
20- outputs :
21- matrix : ${{ steps.set-matrix.outputs.matrix }}
22- steps :
23- - name : Checkout Repo
24- uses : actions/checkout@v4
25- - name : Install nix
26- uses : ./.github/actions/nix-install-ephemeral
27- - id : set-matrix
28- name : Generate Nix Matrix
29- run : |
30- set -Eeu
31- echo matrix="$(nix shell github:nix-community/nix-eval-jobs --command scripts/github-matrix.py checks legacyPackages)" >> "$GITHUB_OUTPUT"
19+ uses : ./.github/workflows/nix-eval.yml
20+ secrets :
21+ DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
22+ NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
3223
3324 nix-build-aarch64-linux :
3425 name : ${{ matrix.name }} (aarch64-linux)
Original file line number Diff line number Diff line change 1+ name : Nix Eval
2+
3+ on :
4+ workflow_call :
5+ outputs :
6+ matrix :
7+ description : ' Generated build matrix'
8+ value : ${{ jobs.eval.outputs.matrix }}
9+ secrets :
10+ DEV_AWS_ROLE :
11+ required : false
12+ NIX_SIGN_SECRET_KEY :
13+ required : false
14+
15+ jobs :
16+ eval :
17+ runs-on : blacksmith-32vcpu-ubuntu-2404
18+ outputs :
19+ matrix : ${{ steps.set-matrix.outputs.matrix }}
20+ steps :
21+ - name : Checkout Repo
22+ uses : actions/checkout@v4
23+ - name : Install nix
24+ uses : ./.github/actions/nix-install-ephemeral
25+ env :
26+ DEV_AWS_ROLE : ${{ secrets.DEV_AWS_ROLE }}
27+ NIX_SIGN_SECRET_KEY : ${{ secrets.NIX_SIGN_SECRET_KEY }}
28+ - id : set-matrix
29+ name : Generate Nix Matrix
30+ run : |
31+ set -Eeu
32+ echo matrix="$(nix shell github:nix-community/nix-eval-jobs/v2.31.0 --command scripts/github-matrix.py checks legacyPackages)" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments