summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-11-24 22:50:32 -0600
committerAiden Cline <[email protected]>2025-11-24 22:50:32 -0600
commit997aacf7f0d5d1bff2b7880e01784e4307d185ad (patch)
treec94d57e39cfb6413099330960fa7bf29c25c30f9 /.github/workflows
parent3183978c6b8e2e11833c9fc119ddb601d3b10dab (diff)
downloadopencode-997aacf7f0d5d1bff2b7880e01784e4307d185ad.tar.gz
opencode-997aacf7f0d5d1bff2b7880e01784e4307d185ad.zip
ci: adjust nix hash
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update-nix-hashes.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/.github/workflows/update-nix-hashes.yml b/.github/workflows/update-nix-hashes.yml
index c0ff77b56..38dba2e35 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)"