Repository navigation
fix(ci): move dev builds from every push to a daily schedule - #2113
Conversation
publish.yml ran the full 6-platform native build + dev release on every merge to main (~8/day), tracking merge frequency instead of actual need. Move the dev-build trigger to a daily schedule with a no-new-commits skip, decoupling cost from merge cadence while leaving stable releases untouched.
Greptile SummaryThis PR replaces the
Confidence Score: 5/5Safe to merge — the schedule-to-skip gate is logically sound and all three trigger paths (schedule, release, workflow_dispatch) have been traced through the needs chain correctly. The gate logic is correct: should_run=false on a quiet schedule skips preflight, which propagates the skip down through compute-version, build-native, and publish-dev via the normal GitHub Actions needs-skipping behaviour. The check-dev-needed job does almost nothing for non-schedule events, so stable releases are not meaningfully affected. The SHA extraction is now anchored to the release notes template text rather than picking the first bare hex string. No functional regressions found. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "fix(ci): skip full-history checkout on n..." | Re-trigger Greptile |
| - uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
Unconditional full-history checkout for non-schedule events
actions/checkout@v7 with fetch-depth: 0 runs for every trigger (release, workflow_dispatch), even though the subsequent step immediately exits with should_run=true for those events without using the repo contents. For a stable-release run this means a full-depth clone for zero benefit. Consider wrapping the checkout in a step-level if: github.event_name == 'schedule' condition, or restructuring so non-schedule events bypass the job entirely.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Fixed — added if: github.event_name == 'schedule' to the checkout step so the full-depth clone only runs for the scheduled path that actually needs git history; release/workflow_dispatch now skip the checkout entirely and exit should_run=true without touching repo contents.
| exit 0 | ||
| fi | ||
|
|
||
| COMMIT_SHA=$(gh release view "$LATEST_TAG" --json body -q .body | grep -oE '[0-9a-f]{40}' | head -1) |
There was a problem hiding this comment.
SHA extraction relies on positional regex match against release notes prose
grep -oE '[0-9a-f]{40}' | head -1 silently picks the first 40-char hex string in the release body. The current publish-dev template reliably puts github.sha first, so this works today. But if the release notes ever include another long hex string before the commit SHA, the gate could compute git rev-list <wrong-sha>..HEAD, potentially skipping a needed build. A more targeted extraction (e.g. matching the surrounding template text) would be more robust.
There was a problem hiding this comment.
Fixed — anchored the extraction to the "commit " phrasing used by the publish-dev release notes template (grep -oE 'commit[^0-9a-f]*[0-9a-f]{40}') instead of grabbing the first bare 40-char hex string in the body. This ties the match to the known template context so an unrelated hex string elsewhere in the notes won't be picked up.
…SHA parse (#2113) The check-dev-needed gate only reads git history for the schedule path; release/workflow_dispatch exit immediately without touching the checkout, so gate the fetch-depth: 0 clone on github.event_name == 'schedule'. Also anchor the dev-release SHA extraction to the "commit <sha>" phrasing used by the publish-dev release notes template instead of matching the first bare 40-char hex string in the body, which could pick up an unrelated hex string in future release notes.
|
Addressed Greptile's review feedback:
Both changes verified with |
Summary
publish.ymltriggered the full 6-platform native build + dev GitHub-release on every merge to main (~8/day, tracking merge frequency rather than actual need)push: branches: [main]to a dailyschedule, with acheck-dev-neededgate that skips the run entirely if main hasn't moved since the last dev releaserelease: published) and the manual retry path (workflow_dispatch) are unaffectedWhy
Part of a broader CI/CD cost-reduction effort (#2108). Even though this repo's GitHub Actions usage is 100% discounted (public repo), the underlying compute is real — a 6-platform Rust cross-compilation running ~8x/day regardless of whether anyone needs a fresher dev build. Coalescing to once a day cuts this ~8x while keeping the
dogfoodskill's "dev from GitHub release tarballs" path working.Closes #2108
Test plan
python3 -c "import yaml; yaml.safe_load(...)"— YAML parsesactionlint— no new findings (all reported shellcheck issues are pre-existing, unrelated lines)gh release list/gh release viewSHA-extraction logic against the actual current dev release (dev-v3.15.1-dev.152) — correctly parses the commit SHA from release notesworkflow_dispatch-based stable retry path unchanged and should be spot-checked on next real release