ci: make lint PR-only with concurrency - #288
Merged
Merged
Conversation
Branch protection makes the merge commit identical to the last PR head, so re-running lint on push to main is duplicate work. Drop the push:main trigger and add concurrency cancel-in-progress, matching the convention in docs/workflow-trigger-conventions.md (already applied in truenas-apps). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c841a61b-f7c4-44bc-bc0a-8428666bcf27
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.
What
Make the
lint-caller.ymlworkflow PR-only and addconcurrencycancel-in-progress.Why
Per our own convention (
docs/workflow-trigger-conventions.md, already applied intruenas-apps):This workflow still triggered on both
pull_requestandpush: main, doubling lint runs per change, and had noconcurrencygroup so superseded in-progress runs weren't cancelled.Impact
Discovered while analysing the July usage report:
lint-caller.ymlwas the single largest Actions consumer (~$17.5 gross / ~2,900 min for the period), mostly from Renovate PRs. Removing the redundant push-to-main run eliminates a full duplicate lint per merge; the concurrency group cancels superseded runs on rapid pushes.Safety
No coverage loss — PR checks still gate every merge via branch protection.
workflow_dispatchretained for manual runs.