-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.04 KB
/
lint.yml
File metadata and controls
38 lines (32 loc) · 1.04 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
name: Lint
on:
pull_request:
branches: [master]
permissions:
contents: read
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Lint workflows
run: |
echo "::group::Install actionlint"
bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
echo "::endgroup::"
./actionlint -color
- name: Lint shell scripts
run: |
echo "::group::Install shellcheck"
sudo apt-get update && sudo apt-get install -y shellcheck
echo "::endgroup::"
find . -name "*.sh" -type f -exec shellcheck {} +
- name: Lint Dockerfiles
run: |
echo "::group::Install hadolint"
curl -fsSL -o hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64
chmod +x hadolint
echo "::endgroup::"
find . -name "Dockerfile*" -type f -exec ./hadolint {} +