-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
actionlint
as a pre-commit hook (with shellcheck integration) (#…
- Loading branch information
1 parent
50739f9
commit 712c886
Showing
9 changed files
with
61 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Configuration for the actionlint tool, which we run via pre-commit | ||
# to verify the correctness of the syntax in our GitHub Actions workflows. | ||
|
||
self-hosted-runner: | ||
# Various runners we use that aren't recognized out-of-the-box by actionlint: | ||
labels: | ||
- depot-ubuntu-latest-8 | ||
- depot-ubuntu-22.04-16 | ||
- windows-latest-xlarge |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,5 +100,23 @@ repos: | |
hooks: | ||
- id: check-github-workflows | ||
|
||
# `actionlint` hook, for verifying correct syntax in GitHub Actions workflows. | ||
# Some additional configuration for `actionlint` can be found in `.github/actionlint.yaml`. | ||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.7.4 | ||
hooks: | ||
- id: actionlint | ||
# `release.yml` is autogenerated by `dist`; issues need to be fixed there | ||
# (https://opensource.axo.dev/cargo-dist/) | ||
exclude: .github/workflows/release.yml | ||
args: | ||
- "-ignore=SC2129" # ignorable stylistic lint from shellcheck | ||
- "-ignore=SC2016" # another shellcheck lint: seems to have false positives? | ||
additional_dependencies: | ||
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions | ||
# and checks these with shellcheck. This is arguably its most useful feature, | ||
# but the integration only works if shellcheck is installed | ||
- "github.com/wasilibs/go-shellcheck/cmd/[email protected]" | ||
|
||
ci: | ||
skip: [cargo-fmt, dev-generate-all] |