From 7d60ea4e73924651baed75b6820131640972bd3f Mon Sep 17 00:00:00 2001 From: Aliou Diallo Date: Wed, 25 Mar 2026 14:54:39 +0100 Subject: [PATCH] fix(ci): skip flake hash commit when unchanged --- .github/workflows/version.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 553f198..7f61dc1 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -111,10 +111,14 @@ jobs: sed -i "s|hash = \"sha256-.*\"; # linux-arm64|hash = \"${LINUX_ARM_HASH}\"; # linux-arm64|" flake.nix sed -i "s|hash = \"sha256-.*\"; # linux-x64|hash = \"${LINUX_X64_HASH}\"; # linux-x64|" flake.nix - # Commit hash update - git add flake.nix - git commit -m "chore: update binary hashes for ${TAG}" - git push origin main + # Commit hash update only if flake.nix changed + if git diff --quiet -- flake.nix; then + echo "No flake.nix hash changes to commit" + else + git add flake.nix + git commit -m "chore: update binary hashes for ${TAG}" + git push origin main + fi # Create tag on the new commit and release git tag -a "${TAG}" -m "Release ${TAG}" -- 2.51.2