Skip to content

Commit 4202260

Browse files
ci: add GitHub Action linter (#767)
This is a meta-linter of sorts that lints GitHub Actions themselves Should be useful when we introduce more CI to this repository --------- Signed-off-by: Nathan Weinberg <[email protected]> Co-authored-by: BJ Hargrave <[email protected]>
1 parent 27ade53 commit 4202260

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/actionlint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
name: Lint GitHub Actions workflows
4+
on:
5+
push:
6+
branches:
7+
- "main"
8+
paths:
9+
- '.github/workflows/*.ya?ml'
10+
pull_request:
11+
branches:
12+
- "main"
13+
paths:
14+
- '.github/workflows/*.ya?ml'
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
actionlint:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Download actionlint
27+
id: get_actionlint
28+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.27
29+
- name: Check workflow files
30+
run: PATH=".:$PATH" actionlint -color

0 commit comments

Comments
 (0)