@@ -41,19 +41,25 @@ jobs:
4141 - name : Update flake.lock
4242 run : |
4343 set -euo pipefail
44+ echo "📦 Updating flake.lock..."
4445 nix flake update
46+ echo "✅ flake.lock updated successfully"
4547
4648 - name : Update node_modules hash
4749 run : |
4850 set -euo pipefail
51+ echo "🔄 Updating node_modules hash..."
4952 nix/scripts/update-hashes.sh
53+ echo "✅ node_modules hash updated successfully"
5054
5155 - name : Commit hash changes
5256 env :
5357 TARGET_BRANCH : ${{ github.head_ref || github.ref_name }}
5458 run : |
5559 set -euo pipefail
5660
61+ echo "🔍 Checking for changes in tracked Nix files..."
62+
5763 summarize() {
5864 local status="$1"
5965 {
@@ -71,16 +77,24 @@ jobs:
7177 FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json)
7278 STATUS="$(git status --short -- "${FILES[@]}" || true)"
7379 if [ -z "$STATUS" ]; then
80+ echo "✅ No changes detected. Hashes are already up to date."
7481 summarize "no changes"
75- echo "No changes to tracked Nix files. Hashes are already up to date."
7682 exit 0
7783 fi
7884
85+ echo "📝 Changes detected:"
86+ echo "$STATUS"
87+ echo "🔗 Staging files..."
7988 git add "${FILES[@]}"
89+ echo "💾 Committing changes..."
8090 git commit -m "Update Nix flake.lock and hashes"
91+ echo "✅ Changes committed"
8192
8293 BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}"
94+ echo "🌳 Pulling latest from branch: $BRANCH"
8395 git pull --rebase origin "$BRANCH"
96+ echo "🚀 Pushing changes to branch: $BRANCH"
8497 git push origin HEAD:"$BRANCH"
98+ echo "✅ Changes pushed successfully"
8599
86100 summarize "committed $(git rev-parse --short HEAD)"
0 commit comments