Skip to content

feat: add nightly update mode to auto-update workflow#366

Merged
tomusdrw merged 1 commit intomainfrom
feature/auto-update-nightly-mode
Mar 25, 2026
Merged

feat: add nightly update mode to auto-update workflow#366
tomusdrw merged 1 commit intomainfrom
feature/auto-update-nightly-mode

Conversation

@tomusdrw
Copy link
Copy Markdown
Member

@tomusdrw tomusdrw commented Mar 25, 2026

Summary

  • Add a workflow_dispatch input to select between tag (latest release) and nightly (latest main branch) update modes
  • Nightly mode compares and checks out the graypaper-archive main branch SHA instead of release tags
  • Skip GitHub release creation for nightly updates

Test plan

  • Trigger workflow manually with tag mode and verify it behaves as before
  • Trigger workflow manually with nightly mode and verify it tracks the main branch SHA
  • Verify scheduled runs default to tag mode

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added manual workflow dispatch with configurable update mode selection (tag or nightly).
    • Introduced nightly build mode alongside standard tagged release updates.
    • Implemented mode-specific update detection and versioning logic for flexible deployment strategies.

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>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 25, 2026

Deploy Preview for graypaper-reader ready!

Name Link
🔨 Latest commit 9d2dfa2
🔍 Latest deploy log https://app.netlify.com/projects/graypaper-reader/deploys/69c39f261fdc43000821b21c
😎 Deploy Preview https://deploy-preview-366--graypaper-reader.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

A GitHub Actions workflow enhancement that introduces an update_mode input option (tag or nightly) to support two update detection strategies: release tag-based updates or continuous builds from the main branch. The workflow logic, versioning, and release creation steps are conditional based on the selected mode.

Changes

Cohort / File(s) Summary
Workflow Dispatch Configuration & Update Mode Handling
.github/workflows/auto-update.yml
Added workflow_dispatch.inputs.update_mode parameter with tag and nightly options. Threaded mode through workflow via check_for_updates job output and UPDATE_MODE environment variable in update job. Modified update detection logic to compare commit SHAs in nightly mode vs. tag names in tag mode. Updated archive checkout and versioning to handle both modes, with nightly mode setting version to nightly-$shortSHA. Conditional release creation now skipped when mode is nightly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A workflow now dances in dual-mode delight,
Between nightly whispers and tag-based might,
SHA hops and releases align in their track,
The automation evolves, never looking back! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add nightly update mode to auto-update workflow' accurately describes the primary change: adding a new nightly update mode feature to the auto-update workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/auto-update-nightly-mode

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Visual Regression Test Report ✅ Passed

Github run id: 23532174912

🔗 Artifacts: Download

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Refresh 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-gp whenever 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

📥 Commits

Reviewing files that changed from the base of the PR and between bcae5d4 and 9d2dfa2.

📒 Files selected for processing (1)
  • .github/workflows/auto-update.yml

@tomusdrw tomusdrw merged commit d92bebc into main Mar 25, 2026
9 checks passed
@tomusdrw tomusdrw deleted the feature/auto-update-nightly-mode branch March 25, 2026 09:08
@coderabbitai coderabbitai bot mentioned this pull request Mar 25, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant