Skip to content

Commit

Permalink
Fixed failing docker-tag-delete script
Browse files Browse the repository at this point in the history
Docker Hub API changed the response code. Made "grep" check case insensitive.
  • Loading branch information
lmakarov committed Jul 29, 2022
1 parent 0e99fb5 commit d7afcac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/docker-tag-delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [[ "${1}" == "" ]]; then
exit 1
else
# Split image:tag
IFS=$':' read IMAGE TAG <<< ${1};
IFS=$':' read IMAGE TAG <<< "${1}";
# Remove registry prefix from image if present
IMAGE=${IMAGE#"docker.io/"}
fi
Expand All @@ -42,4 +42,4 @@ output=$(curl -sI "https://hub.docker.com/v2/repositories/${IMAGE}/tags/${TAG}/"
)

# Return and error if HTTP response code is not 204
echo "${output}" | grep "HTTP/1.1 204 NO CONTENT"
echo "${output}" | grep -i "HTTP/1.1 204 No Content"
4 changes: 2 additions & 2 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,5 @@ jobs:
docker manifest push ${tag}
done
# Clean up intermediate arch-specific image tags (DockerHub only)
.github/scripts/docker-tag-delete.sh ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-amd64
.github/scripts/docker-tag-delete.sh ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-arm64
.github/scripts/docker-tag-delete.sh "${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-amd64"
.github/scripts/docker-tag-delete.sh "${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-arm64"

0 comments on commit d7afcac

Please sign in to comment.