diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 0000000000..4613e1617b --- /dev/null +++ b/.github/actionlint-matcher.json @@ -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 + } + ] + } + ] +} diff --git a/.github/workflows/actions-lint.yml b/.github/workflows/actions-lint.yml new file mode 100644 index 0000000000..d318601035 --- /dev/null +++ b/.github/workflows/actions-lint.yml @@ -0,0 +1,36 @@ +name: actions-lint + +on: + push: + branches: [ main ] + paths-ignore: + - '**/*.gitattributes' + - '**/*.gitignore' + - '**/*.md' + pull_request: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + +env: + FORCE_COLOR: 3 + TERM: xterm + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + + - name: Checkout code + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + + - name: Add actionlint problem matcher + run: echo "::add-matcher::.github/actionlint-matcher.json" + + - name: Lint workflows + uses: docker://rhysd/actionlint@sha256:86ebdb1c0df5a8be92b9d53e2e0c636978a2b3c6e52c86c65a77e2c78a6bd594 # v1.6.25 + with: + args: -color