Sfoglia il codice sorgente

ci: adjust nix hash

Aiden Cline 3 mesi fa
parent
commit
997aacf7f0
1 ha cambiato i file con 15 aggiunte e 1 eliminazioni
  1. 15 1
      .github/workflows/update-nix-hashes.yml

+ 15 - 1
.github/workflows/update-nix-hashes.yml

@@ -41,12 +41,16 @@ jobs:
       - name: Update flake.lock
       - name: Update flake.lock
         run: |
         run: |
           set -euo pipefail
           set -euo pipefail
+          echo "📦 Updating flake.lock..."
           nix flake update
           nix flake update
+          echo "✅ flake.lock updated successfully"
 
 
       - name: Update node_modules hash
       - name: Update node_modules hash
         run: |
         run: |
           set -euo pipefail
           set -euo pipefail
+          echo "🔄 Updating node_modules hash..."
           nix/scripts/update-hashes.sh
           nix/scripts/update-hashes.sh
+          echo "✅ node_modules hash updated successfully"
 
 
       - name: Commit hash changes
       - name: Commit hash changes
         env:
         env:
@@ -54,6 +58,8 @@ jobs:
         run: |
         run: |
           set -euo pipefail
           set -euo pipefail
 
 
+          echo "🔍 Checking for changes in tracked Nix files..."
+
           summarize() {
           summarize() {
             local status="$1"
             local status="$1"
             {
             {
@@ -71,16 +77,24 @@ jobs:
           FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json)
           FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json)
           STATUS="$(git status --short -- "${FILES[@]}" || true)"
           STATUS="$(git status --short -- "${FILES[@]}" || true)"
           if [ -z "$STATUS" ]; then
           if [ -z "$STATUS" ]; then
+            echo "✅ No changes detected. Hashes are already up to date."
             summarize "no changes"
             summarize "no changes"
-            echo "No changes to tracked Nix files. Hashes are already up to date."
             exit 0
             exit 0
           fi
           fi
 
 
+          echo "📝 Changes detected:"
+          echo "$STATUS"
+          echo "🔗 Staging files..."
           git add "${FILES[@]}"
           git add "${FILES[@]}"
+          echo "💾 Committing changes..."
           git commit -m "Update Nix flake.lock and hashes"
           git commit -m "Update Nix flake.lock and hashes"
+          echo "✅ Changes committed"
 
 
           BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}"
           BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}"
+          echo "🌳 Pulling latest from branch: $BRANCH"
           git pull --rebase origin "$BRANCH"
           git pull --rebase origin "$BRANCH"
+          echo "🚀 Pushing changes to branch: $BRANCH"
           git push origin HEAD:"$BRANCH"
           git push origin HEAD:"$BRANCH"
+          echo "✅ Changes pushed successfully"
 
 
           summarize "committed $(git rev-parse --short HEAD)"
           summarize "committed $(git rev-parse --short HEAD)"