-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.1 KB
/
Copy pathactionlint.yml
File metadata and controls
40 lines (36 loc) · 1.1 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
name: Workflow lint
on:
push:
branches:
- master
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
actionlint:
name: actionlint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Check GitHub Actions workflows
shell: bash
run: |
set -euo pipefail
if [ "$(id -u)" -eq 0 ]; then
echo "::error title=Root runner is not allowed::actionlint must run as the runner user"
exit 1
fi
version="1.7.12"
archive="actionlint_${version}_linux_amd64.tar.gz"
checksum="8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8"
curl -fsSLO "https://github.com/rhysd/actionlint/releases/download/v${version}/${archive}"
echo "${checksum} ${archive}" | sha256sum -c -
tar -xzf "${archive}" actionlint
./actionlint -color