Skip to content

Commit 7394de7

Browse files
committed
chore(run-pre-commit): Improve Hadolint install step
1 parent c636df1 commit 7394de7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

run-pre-commit/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ runs:
6666
toolchain: ${{ inputs.rust }}
6767
components: ${{ inputs.rust-components }}
6868

69-
- name: Setup Hadolint
69+
- name: Install Hadolint
7070
if: ${{ inputs.hadolint }}
7171
shell: bash
72+
env:
73+
HADOLINT_VERSION: ${{ inputs.hadolint }}
7274
run: |
7375
set -euo pipefail
7476
@@ -79,8 +81,8 @@ runs:
7981
ARCH=$(uname -m)
8082
8183
mkdir -p "$LOCATION_DIR"
82-
curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ inputs.hadolint }}/hadolint-$SYSTEM-$ARCH"
83-
chmod 700 "${LOCATION_BIN}"
84+
curl -sL -o "$LOCATION_BIN" "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VERSION}/hadolint-$SYSTEM-$ARCH"
85+
chmod 700 "$LOCATION_BIN"
8486
8587
echo "$LOCATION_DIR" | tee -a "$GITHUB_PATH"
8688

0 commit comments

Comments
 (0)