Skip to content

Commit f0355ce

Browse files
committed
[#1] Pin version of hadolint
1 parent a07377f commit f0355ce

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ci/docker-build-push.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ CHANGED_FILES=$(git show --oneline --name-only "${CI_COMMIT}")
77
NAMESPACE="litefarm"
88
PREFIX=$(date +%Y%m%d.%H%M%S)
99
TAG="${PREFIX}.${CI_COMMIT:0:7}"
10+
HADOLINT="hadolint/hadolint:v2.12.0-alpine"
1011

11-
docker pull hadolint/hadolint:latest-alpine
12+
docker pull "${HADOLINT}"
1213

1314
while read -r change; do
1415
(
1516
echo "${change}"
1617
if [[ "${change}" =~ Dockerfile$ ]]; then
1718
image=$(awk -F '/' '{print $1}' <<<"${change}")
1819
cd "${image}"
19-
docker run --rm -i hadolint/hadolint:latest-alpine hadolint - <Dockerfile
20+
docker run --rm -i "${HADOLINT}" hadolint - <Dockerfile
2021
docker build -t "${NAMESPACE}/${image}:${TAG}" .
2122
docker push "${NAMESPACE}/${image}:${TAG}"
2223
fi

0 commit comments

Comments
 (0)