You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(lint): add actionlint check and fix every finding it surfaces
With 17 workflow files and two composite actions after the per-type
split, it's easy to introduce silent drift in workflow_dispatch input
names, matrix expressions, `needs:` / `steps:` / `secrets:` / `vars:`
references, `uses:` paths, and `if:` expressions. Add a small PR-time
lint job (`.github/workflows/lint.yml`) that runs rhysd/actionlint
against every push/PR touching `.github/` (workflows, composite
actions, scripts, or the optional `actionlint.yaml` config). shellcheck
is preinstalled on ubuntu-24.04, so actionlint also lints the `run:`
shell snippets.
The actionlint version is pinned via `ACTIONLINT_VERSION` so upstream
rule additions don't silently change our lint surface between runs;
bumping the version is an explicit, reviewable commit. The downloader
script is taken verbatim from the actionlint README to avoid a
third-party Action dependency.
The shellcheck sub-linter is invoked with `-S warning` so CI only
gates on warning+error severity. This filters out the large body of
info-level SC2086 ('unquoted $var') findings in the older per-type
workflows -- low-risk in practice because their values come from
tightly-controlled workflow_dispatch inputs and GitHub expressions.
`-e SC2046 -e SC2166` silences two additional warning-class codes
deliberately deferred to a later shellcheck sweep PR (both are bash
style/portability lints, not correctness bugs).
The remaining genuine findings are fixed in the same commit so the
job comes up green on first run:
* gcp-publish.yml: drop invalid `default: ''` on two choice inputs.
* gcp-test.yml: fix always-true `[ "${{ inputs.arch == 'ALL' }}" ]`
test (SC2078), drop dead `matrix.zone` / `matrix.arch` references
in the x86_64 per-shape job whose matrix declares only `shape:`.
* azure-to-gallery.yml: bind GHA expressions (env.IMAGE_FILE,
inputs.url_type, inputs.dry-run-mode, inputs.public_gallery,
env.RELEASE_VERSION) to local shell variables before using them
in `[[ ... ]]` / `case` tests (SC2193).
* vagrant-publish.yml: drop unreachable `continue` after `exit 1`,
and split `export VAR="$(cmd)"` into assign + export so a failing
`hcp auth print-access-token` isn't masked by export's own exit
code (SC2155).
* ami-to-marketplace.yml: scoped `# shellcheck disable=SC2195` on
the product-ID case block, with an explanatory comment whose
lines don't start with the word 'shellcheck' (would otherwise be
mis-parsed as directives, SC1072 / SC1073).
0 commit comments