ci: lint workflows + composite actions (actionlint + shellcheck)#3
Merged
Conversation
Add a CI workflow that runs actionlint over the repo's own workflow files (release.yml, this ci.yml) and shellcheck over the composite actions' run: blocks (which actionlint does not inspect). Pins actions/checkout to a SHA and actionlint to v1.7.12. This is the gate we'll require on main once it lands.
actionlint flagged the '[ -f ] && echo || true' one-liner (SC2015: A && B || C is not if-then-else). Rewrite to an explicit if so the repo is lint-clean and the new lint gate can be made required. Behavior is unchanged.
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
Adds the repo's own CI gate ahead of the v2 work:
release.yml,ci.yml) — also runs shellcheck on theirrun:blocks.run:blocks (informational for now), which actionlint does not inspect. GitHub${{ }}expressions are tokenized before linting; SC2154/SC2086 are excluded.actions/checkoutpinned to SHA; actionlint pinned to v1.7.12.Once this is on
main, I'll addlintas a required status check so the branch protection is fully wired (PRs can't merge unless this passes). The large v2 PR will then be linted by this gate before it merges.Test plan
lintjob green on this PR (it lints itself)