Skip to content

The open source coding agent.

TypeScript

ci: adjust nix hash

Aiden Cline997aacf7f0d5
diff --git a/.github/workflows/update-nix-hashes.yml b/.github/workflows/update-nix-hashes.yml
index c0ff77b5640..38dba2e3556 100644
--- a/.github/workflows/update-nix-hashes.yml
+++ b/.github/workflows/update-nix-hashes.yml
@@ -41,12 +41,16 @@ jobs:
- name: Update flake.lock
run: |
set -euo pipefail
+ echo "πŸ“¦ Updating flake.lock..."
nix flake update
+ echo "βœ… flake.lock updated successfully"
- name: Update node_modules hash
run: |
set -euo pipefail
+ echo "πŸ”„ Updating node_modules hash..."
nix/scripts/update-hashes.sh
+ echo "βœ… node_modules hash updated successfully"
- name: Commit hash changes
env:
@@ -54,6 +58,8 @@ jobs:
run: |
set -euo pipefail
+ echo "πŸ” Checking for changes in tracked Nix files..."
+
summarize() {
local status="$1"
{
@@ -71,16 +77,24 @@ jobs:
FILES=(flake.lock flake.nix nix/node-modules.nix nix/hashes.json)
STATUS="$(git status --short -- "${FILES[@]}" || true)"
if [ -z "$STATUS" ]; then
+ echo "βœ… No changes detected. Hashes are already up to date."
summarize "no changes"
- echo "No changes to tracked Nix files. Hashes are already up to date."
exit 0
fi
+ echo "πŸ“ Changes detected:"
+ echo "$STATUS"
+ echo "πŸ”— Staging files..."
git add "${FILES[@]}"
+ echo "πŸ’Ύ Committing changes..."
git commit -m "Update Nix flake.lock and hashes"
+ echo "βœ… Changes committed"
BRANCH="${TARGET_BRANCH:-${GITHUB_REF_NAME}}"
+ echo "🌳 Pulling latest from branch: $BRANCH"
git pull --rebase origin "$BRANCH"
+ echo "πŸš€ Pushing changes to branch: $BRANCH"
git push origin HEAD:"$BRANCH"
+ echo "βœ… Changes pushed successfully"
summarize "committed $(git rev-parse --short HEAD)"