Skip to content

Commit

Permalink
Add actionlint problem matcher via npm script
Browse files Browse the repository at this point in the history
  • Loading branch information
klutchell committed Apr 4, 2024
1 parent a04129a commit 45297ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ jobs:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

# https://github.com/reviewdog/action-actionlint
- name: Check workflow files
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
actionlint_flags: -color -shellcheck=
fail_on_error: true
level: info

# https://github.com/rhysd/actionlint/blob/main/docs/usage.md
- name: Check workflow files
env:
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"private": "true",
"scripts": {
"build": "node build",
"test": "npm run build && git diff --exit-code ./.github/workflows/flowzone.yml ./README.md",
"lint": "docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:1.6.27 -color -shellcheck=",
"test": "npm run build && git diff --exit-code ./.github/workflows/flowzone.yml ./README.md && npm run lint",
"lint": "npm run add-matcher && docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:1.6.27 -color -shellcheck=",
"add-matcher": "echo ::add-matcher::.github/actionlint-matcher.json",
"prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module"
},
"repository": {
Expand Down

0 comments on commit 45297ba

Please sign in to comment.