Skip to content

Commit c45c049

Browse files
authored
Pin mvdan/gofumpt in github workflow ci and fix bash variable quoting (#7923)
* Pin mvdan/gofumpt to v0.8.0 instead of latest * Quote bash variables to prevent globbing See shellcheck SC2053 https://github.com/koalaman/shellcheck/wiki/SC2053
1 parent 467d7be commit c45c049

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
195195

196196
- name: Install gofumpt
197-
run: go install mvdan.cc/gofumpt@latest
197+
run: go install mvdan.cc/gofumpt@v0.8.0
198198
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
199199

200200
- name: Check if telemetry schema changed

hack/docker.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ git_tag=$1
44
docker_tag=edge
55

66
git_commit=$(git rev-parse HEAD)
7-
commit_tag=$(git describe --exact-match ${git_commit} 2>/dev/null)
7+
commit_tag=$(git describe --exact-match "${git_commit}" 2>/dev/null)
88

9-
if [[ ${commit_tag} == ${git_tag} ]]; then
9+
if [[ ${commit_tag} == "${git_tag}" ]]; then
1010
# we're on the exact commit of the tag, use the docker image for the tag
1111
docker_tag=${git_tag//v/}
12-
echo ${docker_tag}
12+
echo "${docker_tag}"
1313
exit 0
1414

1515
else
1616
# we're on a random commit, pull the 'edge' docker image to compare commits
1717
# if it's the latest commit from 'main' the SHA will match the 'revision' of the 'edge' docker image
1818
docker pull nginx/nginx-ingress:${docker_tag} >/dev/null 2>&1
1919
DOCKER_SHA=$(docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.revision" }}' nginx/nginx-ingress:${docker_tag})
20-
if [[ ${DOCKER_SHA} == ${git_commit} ]]; then
20+
if [[ ${DOCKER_SHA} == "${git_commit}" ]]; then
2121
# we're on the same commit as the latest edge
2222
echo ${docker_tag}
2323
exit 0

0 commit comments

Comments
 (0)