-
Notifications
You must be signed in to change notification settings - Fork 173
42 lines (34 loc) · 1.26 KB
/
lint-actions.yaml
File metadata and controls
42 lines (34 loc) · 1.26 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
name: Lint GitHub Actions
on:
pull_request:
paths:
- '.github/workflows/**'
- '.github/actions/**'
- '.github/actionlint.yaml'
permissions:
contents: read
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install actionlint
env:
VERSION: "1.7.11"
EXPECTED_SHA256: "900919a84f2229bac68ca9cd4103ea297abc35e9689ebb842c6e34a3d1b01b0a"
run: |
curl -fsSL -o actionlint.tar.gz "https://github.com/rhysd/actionlint/releases/download/v${VERSION}/actionlint_${VERSION}_linux_amd64.tar.gz"
echo "${EXPECTED_SHA256} actionlint.tar.gz" | sha256sum -c -
tar -xzf actionlint.tar.gz actionlint
sudo mv actionlint /usr/local/bin/
rm actionlint.tar.gz
- name: Run actionlint
run: actionlint -color .github/workflows/*.yaml
security-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Check all actions are pinned to SHA
run: bash ci_scripts/check-actions-pinned.sh
- name: Check all workflows declare permissions
run: bash ci_scripts/check-actions-permissions.sh