feat: add nightly update mode to auto-update workflow#366
Conversation
Add a workflow_dispatch input to choose between 'tag' (latest release) and 'nightly' (latest main branch) update modes. Nightly mode tracks the graypaper-archive main branch SHA instead of release tags and skips creating a GitHub release. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for graypaper-reader ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughA GitHub Actions workflow enhancement that introduces an Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Visual Regression Test Report ✅ PassedGithub run id: 23532174912 🔗 Artifacts: Download |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/auto-update.yml (1)
80-95:⚠️ Potential issue | 🟠 MajorRefresh the repo’s Graypaper-derived files before committing.
This step updates the archive checkout, but the workflow never runs the Graypaper sync/copy step before the later
git add .. That means the PR can merge a new archive revision while leaving copied/generated repo content stale.Based on learnings, run
git submodule update --init && npm run cp-gpwhenever the Gray Paper archive changes.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/auto-update.yml around lines 80 - 95, The workflow's archive_update step updates graypaper-archive but doesn't refresh the repo's generated/copied Graypaper files before the later git add; modify the archive update sequence (the step with id archive_update and conditional on UPDATE_MODE) to run "git submodule update --init" and then "npm run cp-gp" after checking out the desired revision so that generated/copied files are synchronized whenever the archive changes, ensuring the subsequent git add . picks up those updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/auto-update.yml:
- Around line 28-29: The workflow currently re-evaluates origin/main during the
update job and may checkout a different tip than the SHA used by
check_for_updates; instead, capture the resolved remote commit SHA in the
check_for_updates job output (e.g. remote_release.outputs.VERSION or a new
remote_release.outputs.COMMIT_SHA) and make the update job use that exact SHA
when checking out or creating the PR in nightly/update_mode (referencing
steps.remote_release.outputs.COMMIT_SHA in the update job instead of refetching
origin/main); apply the same change to the other occurrence noted (the block
around lines 84-88) so both code paths use the pinned remote SHA rather than
re-querying the branch tip.
---
Outside diff comments:
In @.github/workflows/auto-update.yml:
- Around line 80-95: The workflow's archive_update step updates
graypaper-archive but doesn't refresh the repo's generated/copied Graypaper
files before the later git add; modify the archive update sequence (the step
with id archive_update and conditional on UPDATE_MODE) to run "git submodule
update --init" and then "npm run cp-gp" after checking out the desired revision
so that generated/copied files are synchronized whenever the archive changes,
ensuring the subsequent git add . picks up those updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1736a9b8-f10a-4f2c-b1c2-05773d7a9e8d
📒 Files selected for processing (1)
.github/workflows/auto-update.yml
Summary
workflow_dispatchinput to select betweentag(latest release) andnightly(latest main branch) update modesmainbranch SHA instead of release tagsTest plan
tagmode and verify it behaves as beforenightlymode and verify it tracks the main branch SHAtagmode🤖 Generated with Claude Code
Summary by CodeRabbit
tagornightly).