File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ name: pre-commit
4
4
on :
5
5
pull_request :
6
6
7
+ env :
8
+ HADOLINT_VERSION : " v1.17.6"
9
+
7
10
jobs :
8
11
pre-commit :
9
12
runs-on : ubuntu-latest
14
17
- uses : actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
15
18
with :
16
19
python-version : ' 3.12'
20
+ - name : Setup Hadolint
21
+ shell : bash
22
+ run : |
23
+ set -euo pipefail
24
+
25
+ LOCATION_DIR="$HOME/.local/bin"
26
+ LOCATION_BIN="$LOCATION_DIR/hadolint"
27
+
28
+ SYSTEM=$(uname -s)
29
+ ARCH=$(uname -m)
30
+
31
+ mkdir -p "$LOCATION_DIR"
32
+ curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
33
+ chmod 700 "${LOCATION_BIN}"
34
+
35
+ echo "$LOCATION_DIR" >> "$GITHUB_PATH"
17
36
- uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
18
37
with :
19
38
extra_args : " --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
Original file line number Diff line number Diff line change 49
49
rev : 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
50
50
hooks :
51
51
- id : actionlint
52
+
53
+ - repo : https://github.com/hadolint/hadolint
54
+ rev : b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
55
+ hooks :
56
+ - id : hadolint
You can’t perform that action at this time.
0 commit comments