Skip to content

Commit

Permalink
Merge pull request #1375 from alphagov/sengi/actionlint
Browse files Browse the repository at this point in the history
Move actionlint problem-matcher inline so it works cross-repo.
  • Loading branch information
sengi authored Jul 8, 2024
2 parents 1081dc9 + 6f0f48d commit 8830356
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 41 deletions.
22 changes: 0 additions & 22 deletions .github/LICENSE.actionlint-matcher.json

This file was deleted.

17 changes: 0 additions & 17 deletions .github/actionlint-matcher.json

This file was deleted.

13 changes: 11 additions & 2 deletions .github/actions/actionlint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ runs:
env:
ACTIONLINT: '${{ steps.install.outputs.executable }}'
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
cat <<'EOF' >actionlint-matcher.json
{"problemMatcher": [{
"owner": "actionlint",
"pattern": [{
"regexp": "^(.+?):(\\d+):(\\d+): (.+?) \\[(.+?)\\]$",
"file": 1, "line": 2, "column": 3, "message": 4, "code": 5
}]
}]}
EOF
echo "::add-matcher::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 \
"$ACTIONLINT" -no-color \
-ignore "property .runner. is not defined" \
-ignore "property .repository_visibility. is not defined"

0 comments on commit 8830356

Please sign in to comment.