Skip to content

Commit

Permalink
Adds actionlint to lint GitHub Actions workflows (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
JayShortway authored Sep 30, 2024
1 parent 6e1a964 commit 60191bd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 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
}
]
}
]
}
19 changes: 19 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint GitHub Actions workflows
on:
push:
branches: [main]
paths: ['.github/workflows/**']
pull_request:
paths: ['.github/workflows/**']

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable the actionlint matcher
run: echo "::add-matcher::.github/actionlint-matcher.json"
- name: Lint GitHub Actions workflows
uses: docker://rhysd/actionlint:latest
with:
args: -color

0 comments on commit 60191bd

Please sign in to comment.