Repository navigation
Cut Actions minutes: cancel superseded PR runs, skip OpenWiki on push - #42
Merged
Merged
Conversation
The org's $0 Actions budget stopped CI on 2026-10-31 after October's private and internal usage went $0.31 past the included Enterprise minutes (38,799 minutes, about $307 gross, billing API). Every repo calls these reusables on every PR push and every merge, so small savings per run add up across ~95-123 callers. Concurrency on the per-PR jobs - reusable-security-scan.yml: security-scan, dependency-review - reusable-psd-ci.yml: psd-ci, secret-scan - reusable-license-check.yml: license-check Each job gets group: <job>-<repo>-<PR number || run id> cancel-in-progress: event_name == 'pull_request' A new push to a PR cancels the still-running job for the old commit, which could only report on a superseded head. Every other event (push to the default branch, schedule, workflow_dispatch) groups by run_id, so those runs never cancel or queue behind each other. The job name is in the group so sibling jobs in the same reusable don't cancel each other. Job and check names are unchanged, so required checks keep matching. reusable-claude-review.yml already had this and already skips Dependabot PRs, so it is untouched. OpenWiki: no rebuild on push unless a caller opts in - New optional input run_on_push (boolean, default false). - The job has `if: github.event_name != 'push' || inputs.run_on_push`. A skipped job starts no runner and is not billed. The org template, and so every caller, also triggers on push. Done at job level here, one change covers all callers without a PR to each repo. - All 95 repos with .github/workflows/openwiki-update.yml also have a `schedule:` trigger (checked with the contents API on 2026-11-01), so every wiki still rebuilds weekly. workflow_dispatch and the pull_request smoke test (openwiki-smoke.yml) are unaffected. - Behaviour change for callers: wikis refresh weekly instead of after each merge. A repo that wants the old behaviour passes `run_on_push: true`. Release as v1.2.0 (new optional input, callers need no file change). Checked: every workflow parses as YAML, and `zizmor --offline` on the four changed files reports no findings.
krishagel
requested review from
07-C9,
farmerjPSD,
pratzm,
reeseherber and
songstadw
as code owners
November 1, 2026 05:35
This was referenced Nov 1, 2026
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.
The org's $0 Actions budget stopped CI on Oct 31. Private and internal repos went $0.31 past the included minutes (38,799 min). These reusables run in every repo, so the savings below apply org-wide.
Cancel superseded PR runs (security-scan, dependency-review, psd-ci, secret-scan, license-check)
<job>-<repo>-<PR number || run id>, withcancel-in-progressonly onpull_request.reusable-claude-review.ymlalready does this and already skips Dependabot, so it's untouched.OpenWiki: no rebuild on push
run_on_push(defaultfalse), plus job-levelif: github.event_name != 'push' || inputs.run_on_push. A skipped job starts no runner and isn't billed.schedule:, so every wiki still rebuilds weekly.run_on_push: true.Release: v1.2.0 (new optional input; callers change nothing). After that, update the pins in
workflow-templates/.Checked: all workflows parse as YAML, and
zizmor --offlineon the four changed files reports no findings.