|
17 | 17 | - "packages/*/package.json" |
18 | 18 |
|
19 | 19 | jobs: |
20 | | - update-linux: |
| 20 | + update-flake: |
21 | 21 | if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository |
22 | | - runs-on: blacksmith-4vcpu-ubuntu-2404 |
| 22 | + runs-on: ubuntu-latest |
23 | 23 | env: |
24 | | - SYSTEM: x86_64-linux |
| 24 | + TITLE: flake.lock |
25 | 25 |
|
26 | 26 | steps: |
27 | 27 | - name: Checkout repository |
@@ -33,39 +33,32 @@ jobs: |
33 | 33 | repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} |
34 | 34 |
|
35 | 35 | - name: Setup Nix |
36 | | - uses: DeterminateSystems/nix-installer-action@v20 |
| 36 | + uses: nixbuild/nix-quick-install-action@v34 |
37 | 37 |
|
38 | 38 | - name: Configure git |
39 | 39 | run: | |
40 | 40 | |
41 | 41 | git config --global user.name "Github Action" |
42 | 42 |
|
43 | | - - name: Update flake.lock |
| 43 | + - name: Update ${{ env.TITLE }} |
44 | 44 | run: | |
45 | 45 | set -euo pipefail |
46 | | - echo "📦 Updating flake.lock..." |
| 46 | + echo "📦 Updating $TITLE..." |
47 | 47 | nix flake update |
48 | | - echo "✅ flake.lock updated successfully" |
| 48 | + echo "✅ $TITLE updated successfully" |
49 | 49 |
|
50 | | - - name: Update node_modules hash for x86_64-linux |
51 | | - run: | |
52 | | - set -euo pipefail |
53 | | - echo "🔄 Updating node_modules hash for x86_64-linux..." |
54 | | - nix/scripts/update-hashes.sh |
55 | | - echo "✅ node_modules hash for x86_64-linux updated successfully" |
56 | | -
|
57 | | - - name: Commit Linux hash changes |
| 50 | + - name: Commit ${{ env.TITLE }} changes |
58 | 51 | env: |
59 | 52 | TARGET_BRANCH: ${{ github.head_ref || github.ref_name }} |
60 | 53 | run: | |
61 | 54 | set -euo pipefail |
62 | 55 |
|
63 | | - echo "🔍 Checking for changes in tracked Nix files..." |
| 56 | + echo "🔍 Checking for changes in tracked files..." |
64 | 57 |
|
65 | 58 | summarize() { |
66 | 59 | local status="$1" |
67 | 60 | { |
68 | | - echo "### Nix Hash Update (x86_64-linux)" |
| 61 | + echo "### Nix $TITLE" |
69 | 62 | echo "" |
70 | 63 | echo "- ref: ${GITHUB_REF_NAME}" |
71 | 64 | echo "- status: ${status}" |
@@ -75,11 +68,10 @@ jobs: |
75 | 68 | fi |
76 | 69 | echo "" >> "$GITHUB_STEP_SUMMARY" |
77 | 70 | } |
78 | | -
|
79 | | - FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json) |
| 71 | + FILES=(flake.lock flake.nix) |
80 | 72 | STATUS="$(git status --short -- "${FILES[@]}" || true)" |
81 | 73 | if [ -z "$STATUS" ]; then |
82 | | - echo "✅ No changes detected. Hashes are already up to date." |
| 74 | + echo "✅ No changes detected." |
83 | 75 | summarize "no changes" |
84 | 76 | exit 0 |
85 | 77 | fi |
|
89 | 81 | echo "🔗 Staging files..." |
90 | 82 | git add "${FILES[@]}" |
91 | 83 | echo "💾 Committing changes..." |
92 | | - git commit -m "Update Nix flake.lock and x86_64-linux hash" |
| 84 | + git commit -m "Update $TITLE" |
93 | 85 | echo "✅ Changes committed" |
94 | 86 |
|
95 | 87 | BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}" |
@@ -101,12 +93,25 @@ jobs: |
101 | 93 |
|
102 | 94 | summarize "committed $(git rev-parse --short HEAD)" |
103 | 95 |
|
104 | | - update-macos: |
105 | | - needs: update-linux |
| 96 | + update-node-modules-hash: |
| 97 | + needs: update-flake |
106 | 98 | if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository |
107 | | - runs-on: macos-latest |
| 99 | + strategy: |
| 100 | + fail-fast: false |
| 101 | + matrix: |
| 102 | + include: |
| 103 | + - system: x86_64-linux |
| 104 | + host: ubuntu-latest |
| 105 | + - system: aarch64-linux |
| 106 | + host: ubuntu-22.04-arm |
| 107 | + - system: x86_64-darwin |
| 108 | + host: macos-15-intel |
| 109 | + - system: aarch64-darwin |
| 110 | + host: macos-latest |
| 111 | + runs-on: ${{ matrix.host }} |
108 | 112 | env: |
109 | | - SYSTEM: aarch64-darwin |
| 113 | + SYSTEM: ${{ matrix.system }} |
| 114 | + TITLE: node_modules hash (${{ matrix.system }}) |
110 | 115 |
|
111 | 116 | steps: |
112 | 117 | - name: Checkout repository |
@@ -118,7 +123,7 @@ jobs: |
118 | 123 | repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} |
119 | 124 |
|
120 | 125 | - name: Setup Nix |
121 | | - uses: DeterminateSystems/nix-installer-action@v20 |
| 126 | + uses: nixbuild/nix-quick-install-action@v34 |
122 | 127 |
|
123 | 128 | - name: Configure git |
124 | 129 | run: | |
@@ -132,25 +137,25 @@ jobs: |
132 | 137 | BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}" |
133 | 138 | git pull origin "$BRANCH" |
134 | 139 |
|
135 | | - - name: Update node_modules hash for aarch64-darwin |
| 140 | + - name: Update ${{ env.TITLE }} |
136 | 141 | run: | |
137 | 142 | set -euo pipefail |
138 | | - echo "🔄 Updating node_modules hash for aarch64-darwin..." |
| 143 | + echo "🔄 Updating $TITLE..." |
139 | 144 | nix/scripts/update-hashes.sh |
140 | | - echo "✅ node_modules hash for aarch64-darwin updated successfully" |
| 145 | + echo "✅ $TITLE updated successfully" |
141 | 146 |
|
142 | | - - name: Commit macOS hash changes |
| 147 | + - name: Commit ${{ env.TITLE }} changes |
143 | 148 | env: |
144 | 149 | TARGET_BRANCH: ${{ github.head_ref || github.ref_name }} |
145 | 150 | run: | |
146 | 151 | set -euo pipefail |
147 | 152 |
|
148 | | - echo "🔍 Checking for changes in tracked Nix files..." |
| 153 | + echo "🔍 Checking for changes in tracked files..." |
149 | 154 |
|
150 | 155 | summarize() { |
151 | 156 | local status="$1" |
152 | 157 | { |
153 | | - echo "### Nix Hash Update (aarch64-darwin)" |
| 158 | + echo "### Nix $TITLE" |
154 | 159 | echo "" |
155 | 160 | echo "- ref: ${GITHUB_REF_NAME}" |
156 | 161 | echo "- status: ${status}" |
@@ -164,7 +169,7 @@ jobs: |
164 | 169 | FILES=(nix/hashes.json) |
165 | 170 | STATUS="$(git status --short -- "${FILES[@]}" || true)" |
166 | 171 | if [ -z "$STATUS" ]; then |
167 | | - echo "✅ No changes detected. Hash is already up to date." |
| 172 | + echo "✅ No changes detected." |
168 | 173 | summarize "no changes" |
169 | 174 | exit 0 |
170 | 175 | fi |
@@ -174,7 +179,7 @@ jobs: |
174 | 179 | echo "🔗 Staging files..." |
175 | 180 | git add "${FILES[@]}" |
176 | 181 | echo "💾 Committing changes..." |
177 | | - git commit -m "Update aarch64-darwin hash" |
| 182 | + git commit -m "Update $TITLE" |
178 | 183 | echo "✅ Changes committed" |
179 | 184 |
|
180 | 185 | BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}" |
|