Skip to content

Commit ff0caa8

Browse files
committed
Enable actionlint matcher, and fix command injection
1 parent 69becf0 commit ff0caa8

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.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+
}

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ jobs:
1919
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/914e7df21a07ef503a81201c76d2b11c789d3fca/scripts/download-actionlint.bash) 1.7.12
2020
shell: bash
2121
- name: Check workflow files
22-
run: ${{ steps.download-actionlint.outputs.executable }} -color
22+
env:
23+
ACTIONLINT_EXECUTABLE: ${{ steps.download-actionlint.outputs.executable }}
24+
run: |
25+
echo "::add-matcher::.github/actionlint-matcher.json"
26+
"$ACTIONLINT_EXECUTABLE" -color
2327
shell: bash
2428

2529
analyse-code:

0 commit comments

Comments
 (0)