feat: skip pr-build-zip rebuild unless commit has #build-zip - #83
Merged
Conversation
…d-zip Actions minutes were increasing since every push to an open PR rebuilds the full ZIP. Splits the single job into a cheap gate job (checks the pushed commit's message) and the actual build job, gated on the gate job's output. Opened/reopened/ready_for_review PRs and manual dispatch always build -- only a follow-up push (synchronize) needs #build-zip in the commit message. This reverses a documented Phase 1 decision against commit-message gating (see SETUP.md's Design notes) -- that tradeoff (discoverability) is being accepted now specifically to cut Actions minutes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Actions minutes usage has been increasing since every push to an open PR triggers a full rebuild. Restructures the reusable
pr-build-zip.ymlinto a cheapgatejob (no checkout, just reads the pushed commit's message) and the actualbuildjob, gated on the gate job's decision:workflow_dispatch: always builds.synchronize): only builds if the commit message contains#build-zip(case-insensitive substring).This reverses a documented Phase 1 decision against commit-message gating (see SETUP.md's "Design notes" — a magic token "relies on people remembering it and gives reviewers nothing by default"). That tradeoff is being accepted now specifically to cut Actions minutes; decided not to add a skip notice comment to keep it as cheap/quiet as possible.
Affects every repo using this reusable workflow at
@master— no caller-side changes needed.Test plan
themegrill/colormagbefore merging (temporarily pointed its caller at this branch): opened a test PR (built), pushed without#build-zip(skipped), pushed with#build-zip(built) — see comments below.