Skip to content

Commit e96d022

Browse files
committed
Add a workflow to lint github actions
1 parent 01649f1 commit e96d022

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/lint-actions.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint workflow files
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
concurrency:
11+
group: ${{github.workflow}}-${{github.ref}}
12+
cancel-in-progress: ${{github.event_name == 'pull_request'}}
13+
14+
jobs:
15+
lint-github-actions:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Download actionlint
21+
id: get_actionlint
22+
run: |
23+
curl -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
24+
echo "::add-matcher::.github/actionlint-matcher.json"
25+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
26+
shell: bash
27+
- name: Check workflow files
28+
run: ${{ steps.get_actionlint.outputs.executable }} -color
29+
shell: bash

0 commit comments

Comments
 (0)