-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1360 from alphagov/sengi/actionlint
Update actionlint and factor out its config into a reusable action.
- Loading branch information
Showing
2 changed files
with
31 additions
and
20 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,27 @@ | ||
# This reusable action exists only to reduce toil by representing GOV.UK's | ||
# global config for rhysd/actionlint in a single place so we don't have to | ||
# change it in N repos every time we update. | ||
name: Run actionlint | ||
description: Lint GitHub Actions YAML files with rhysd/actionlint. | ||
runs: | ||
using: composite | ||
steps: | ||
- id: install | ||
shell: bash | ||
env: | ||
ACTIONLINT_SHA: 4f6274a8e0f4f4d2057aa9ae07660f61aa29c5f3 # v1.7.1 | ||
run: bash <(curl "https://raw.githubusercontent.com/rhysd/actionlint/$ACTIONLINT_SHA/scripts/download-actionlint.bash") | ||
- name: Run actionlint | ||
shell: bash | ||
env: | ||
ACTIONLINT: '${{ steps.install.outputs.executable }}' | ||
run: | | ||
echo "::add-matcher::.github/actionlint-matcher.json" | ||
# TODO: move non-global ignores inline or to in-tree actionlint.yml once | ||
# https://www.github.com/rhysd/actionlint/issues/237 and/or | ||
# https://www.github.com/rhysd/actionlint/issues/217 is fixed. | ||
# TODO: remove -ignore "property .runner. is not defined" once | ||
# https://www.github.com/rhysd/actionlint/issues/77 is fixed. | ||
"$ACTIONLINT" -color \ | ||
-ignore "property .runner. is not defined" \ | ||
-ignore "property .repository_visibility. is not defined" |
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