Repository navigation
66 lines (57 loc) · 2.15 KB
/
Copy pathactionlint.yml
File metadata and controls
66 lines (57 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Actionlint
# Lint GitHub Actions workflows for syntax errors, unsafe patterns, and shell
# bugs. Part of SDK-79 / Monorepo Supply-Chain Hardening. Runs on every PR so it
# always reports a status and can be wired up as a required check.
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
actionlint:
name: Lint workflows
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT && fromJSON(vars.TIMEOUT_MINUTES_SHORT) || 5 }}
steps:
- name: Checkout repo
uses: actions/checkout@v4.4.0
with:
persist-credentials: false
show-progress: false
sparse-checkout: .github
sparse-checkout-cone-mode: false
- name: Run actionlint
# Pinned by digest (immutable). rhysd/actionlint 1.7.12; the image bundles a
# matching shellcheck. Bump the version and refresh the digest together.
uses: docker://rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
env:
# Intentional word-splitting ($TURBO_ARGS etc., SC2086) and minor style
# (SC2129, SC2162) are excluded; every other shellcheck rule stays on.
SHELLCHECK_OPTS: --exclude=SC2086,SC2129,SC2162
with:
args: -color
actions-lock:
name: Verify actions lockfile
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT && fromJSON(vars.TIMEOUT_MINUTES_SHORT) || 5 }}
steps:
- name: Checkout repo
uses: actions/checkout@v4.4.0
with:
persist-credentials: false
show-progress: false
sparse-checkout: .github
sparse-checkout-cone-mode: false
- name: Install gh-actions-lock
env:
GH_TOKEN: ${{ github.token }}
run: gh extension install github/gh-actions-lock --pin v0.2.0
- name: Verify every workflow dependency is locked
env:
GH_TOKEN: ${{ github.token }}
run: gh actions-lock --verify