Skip to content

Instantly share code, notes, and snippets.

@ybiquitous
Last active August 2, 2021 09:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ybiquitous/c72834b30882d3c1f9c105683d4c1137 to your computer and use it in GitHub Desktop.
Save ybiquitous/c72834b30882d3c1f9c105683d4c1137 to your computer and use it in GitHub Desktop.
Run actionlint on GitHub Actions
{
"problemMatcher": [
{
"owner": "actionlint",
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (.+) \\[(\\S+)\\]$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
name: actionlint
on:
push:
branches: ["master"]
pull_request:
branches: ["**"]
jobs:
actionlint:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: brew tap 'rhysd/actionlint' 'https://github.com/rhysd/actionlint'
- run: brew install actionlint
# Add shellcheck if you need it
# - run: brew install shellcheck
# https://github.com/actions/toolkit/blob/2f164000dcd42fb08287824a3bc3030dbed33687/docs/commands.md#problem-matchers
- name: Set up Problem Matcher
run: echo '::add-matcher::.github/actionlint-problem-matcher.json'
- run: actionlint -oneline
continue-on-error: true
@ybiquitous
Copy link
Author

ybiquitous commented Aug 2, 2021

$ tree .github
.github
├── actionlint-problem-matcher.json
└── workflows/
    └── actionlint.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment