Files
fil/scripts/publish/check-docker-tag.sh

18 lines
439 B
Bash
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
#!/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