Skip to content

Commit 89b3d33

Browse files
authored
Add lint-workflows.yml (#117)
* Add lint-workflows.yml * Fix actions/checkout * Fix permissions for simple workflows * fix command
1 parent 79cb7c0 commit 89b3d33

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Lint workflows
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [main]
10+
paths:
11+
- ".github/workflows/**"
12+
- ".github/actions/**"
13+
pull_request:
14+
branches: ["**"]
15+
paths:
16+
- ".github/workflows/**"
17+
- ".github/actions/**"
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
actionlint:
24+
name: actionlint
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 5
27+
steps:
28+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
29+
with:
30+
persist-credentials: false
31+
- uses: raven-actions/actionlint@205b530c5d9fa8f44ae9ed59f341a0db994aa6f8 # v2.1.2
32+
33+
zizmor:
34+
name: zizmor
35+
runs-on: ubuntu-latest
36+
timeout-minutes: 5
37+
permissions:
38+
security-events: write
39+
steps:
40+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
41+
with:
42+
persist-credentials: false
43+
- uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6

.github/workflows/node.js.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
name: Run tests
2+
23
on:
34
push:
45
branches: ["main"]
56
pull_request:
7+
8+
permissions: {}
9+
610
jobs:
711
build:
812
runs-on: ubuntu-latest
913
steps:
1014
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
15+
with:
16+
persist-credentials: false
1117
- name: Use Node.js
1218
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
1319
with:
@@ -20,4 +26,4 @@ jobs:
2026
- run: npm run lint
2127
- run: npm test
2228
- run: npm run build
23-
- run: npx pkg-pr-new publish || "echo 'pkg-pr-new publish failed'"
29+
- run: npx pkg-pr-new publish || echo 'pkg-pr-new publish failed'

0 commit comments

Comments
 (0)