File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 7
7
env :
8
8
CARGO_TERM_COLOR : always
9
9
RUST_TOOLCHAIN_VERSION : " 1.80.1"
10
+ HADOLINT_VERSION : " v1.17.6"
10
11
11
12
jobs :
12
13
pre-commit :
22
23
with :
23
24
toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
24
25
components : rustfmt,clippy
26
+ - name : Setup Hadolint
27
+ shell : bash
28
+ run : |
29
+ set -euo pipefail
30
+
31
+ LOCATION_DIR="$HOME/.local/bin"
32
+ LOCATION_BIN="$LOCATION_DIR/hadolint"
33
+
34
+ SYSTEM=$(uname -s)
35
+ ARCH=$(uname -m)
36
+
37
+ mkdir -p "$LOCATION_DIR"
38
+ curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
39
+ chmod 700 "${LOCATION_BIN}"
40
+
41
+ echo "$LOCATION_DIR" >> "$GITHUB_PATH"
25
42
- uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
26
43
with :
27
44
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 1
1
---
2
2
fail_fast : false
3
3
4
+ default_language_version :
5
+ node : system
6
+
4
7
repos :
5
8
- repo : https://github.com/pre-commit/pre-commit-hooks
6
9
rev : 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
Original file line number Diff line number Diff line change 3
3
# If you change the Rust toolchain version here, make sure to also change
4
4
# docker-images/ubi8-rust-builder/Dockerfile & docker-images/ubi9-rust-builder/Dockerfile
5
5
rust_version : 1.80.0
6
+ hadolint_version : v1.17.6
Original file line number Diff line number Diff line change 7
7
env:
8
8
CARGO_TERM_COLOR: always
9
9
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"
10
+ HADOLINT_VERSION: "{[ hadolint_version }]"
10
11
11
12
jobs:
12
13
pre-commit:
22
23
with:
23
24
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
24
25
components: rustfmt,clippy
26
+ - name: Setup Hadolint
27
+ shell: bash
28
+ run: |
29
+ set -euo pipefail
30
+
31
+ LOCATION_DIR="$HOME/.local/bin"
32
+ LOCATION_BIN="$LOCATION_DIR/hadolint"
33
+
34
+ SYSTEM=$(uname -s)
35
+ ARCH=$(uname -m)
36
+
37
+ mkdir -p "$LOCATION_DIR"
38
+ curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
39
+ chmod 700 "${LOCATION_BIN}"
40
+
41
+ echo "$LOCATION_DIR" >> "$GITHUB_PATH"
25
42
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
26
43
with:
27
44
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 1
1
---
2
2
exclude: ^(Cargo\.nix|crate-hashes\.json|nix/.*)$
3
3
4
+ default_language_version:
5
+ node: system
6
+
4
7
repos:
5
8
- repo: https://github.com/pre-commit/pre-commit-hooks
6
9
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
You can’t perform that action at this time.
0 commit comments