Skip to content

Pin mvdan/gofumpt in github workflow ci and fix bash variable quoting #7923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
if: ${{ needs.checks.outputs.binary_cache_hit != 'true' }}

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

- name: Check if telemetry schema changed
Expand Down
8 changes: 4 additions & 4 deletions hack/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ git_tag=$1
docker_tag=edge

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

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

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