let a rerun of the nix pin job succeed when the pin already landed

This commit is contained in:
pj committed 2026-09-03 13:59:55 +05:30
1 parent a88055cbbd
commit bfe7baf08d
1 file changed
+5
+5
View File
@@ -220,6 +220,11 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add nix/release.json
# A rerun after the pin already landed has nothing to commit, and the release is done.
if git diff --cached --quiet; then
echo "The flake already points at v$VERSION, nothing to push."
exit 0
fi
git commit -m "point the nix package at v$VERSION"
for attempt in 1 2 3 4 5; do
git fetch origin main