Skip to content

Commit c9526b5

Browse files
committed
Add workflow linter
1 parent a8fffc3 commit c9526b5

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/actionlint-matcher.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "actionlint",
5+
"pattern": [
6+
{
7+
"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)* \\[(.+?)\\]$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"message": 4,
12+
"code": 5
13+
}
14+
]
15+
}
16+
]
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint GitHub Actions workflows
2+
on: [ push, pull_request ]
3+
4+
jobs:
5+
actionlint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
10+
- name: Enable matcher for actionlint
11+
run: echo "::add-matcher::.github/actionlint-matcher.json"
12+
13+
- name: Download and run actionlint
14+
run: |
15+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
16+
./actionlint -color
17+
shell: bash

0 commit comments

Comments
 (0)