Skip to content

Commit

Permalink
Call actionlint directly with GHA matcher
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Harding <kyle@balena.io>
  • Loading branch information
klutchell committed Apr 4, 2024
1 parent ee399c4 commit 01f09fb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
17 changes: 17 additions & 0 deletions .github/actionlint-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "actionlint",
"pattern": [
{
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
18 changes: 9 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

# # https://github.com/rhysd/actionlint/blob/main/docs/usage.md
# - name: Check workflow files
# env:
# ACTIONLINT_VERSION: 1.6.27
# run: |
# echo "::add-matcher::.github/actionlint-matcher.json"
# bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
# ./actionlint -color -shellcheck=
# shell: bash
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md
- name: Check workflow files
env:
ACTIONLINT_VERSION: 1.6.27
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
shell: bash

# https://github.com/reviewdog/action-actionlint
- name: Check workflow files
Expand Down

0 comments on commit 01f09fb

Please sign in to comment.