This commit is contained in:
17
scripts/publish/check-docker-tag.sh
Executable file
17
scripts/publish/check-docker-tag.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
tag="${DOCKER_TAG:?DOCKER_TAG not set}"
|
||||
label="${SUMMARY_LABEL:-image}"
|
||||
|
||||
exists=false
|
||||
if docker manifest inspect "$tag" >/dev/null 2>&1; then
|
||||
exists=true
|
||||
fi
|
||||
|
||||
echo "exists=$exists" >>"${GITHUB_OUTPUT:?GITHUB_OUTPUT not set}"
|
||||
|
||||
if [ "$exists" = "true" ] && [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
|
||||
echo "Docker tag $tag already exists; ${label} publish will be skipped." >>"$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
Reference in New Issue
Block a user