Skip to content

Commit 61c194a

Browse files
committed
fix: stricter semver validation, fail on jq errors
1 parent 38dfd62 commit 61c194a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/auto-update-matrix.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ jobs:
183183
184184
# Deduplicate extra_builds
185185
| .extra_builds = (.extra_builds | unique_by(.driver_version))
186-
' build-matrix.json > build-matrix.json.tmp && mv build-matrix.json.tmp build-matrix.json
186+
' build-matrix.json > build-matrix.json.tmp
187+
mv build-matrix.json.tmp build-matrix.json
187188
188189
echo "Updated build-matrix.json:"
189190
cat build-matrix.json
@@ -219,9 +220,10 @@ jobs:
219220
else . end)
220221
| (if ($beta != "") then .branches.beta.current = $beta else . end)
221222
| (if ($legacy != "") then .branches.legacy.current = $legacy else . end)
222-
| (if ($toolkit != "" and ($toolkit | test("^[0-9]"))) then .runtimes.containertoolkit.current = $toolkit else . end)
223-
| (if ($libnvidia != "" and ($libnvidia | test("^[0-9]"))) then .runtimes.libnvidia.current = $libnvidia else . end)
224-
' versions.json > versions.json.tmp && mv versions.json.tmp versions.json
223+
| (if ($toolkit | test("^[0-9]+(\\\\.[0-9]+)+$")) then .runtimes.containertoolkit.current = $toolkit else . end)
224+
| (if ($libnvidia | test("^[0-9]+(\\\\.[0-9]+)+$")) then .runtimes.libnvidia.current = $libnvidia else . end)
225+
' versions.json > versions.json.tmp
226+
mv versions.json.tmp versions.json
225227
226228
- name: Commit and push if changed
227229
id: commit

0 commit comments

Comments
 (0)