ci(build): normalize DOCKER_TAG in script (strip heads/, lowercase, safe chars)
Some checks failed
dev-test-2 / build-and-push (push) Failing after 5m52s
Some checks failed
dev-test-2 / build-and-push (push) Failing after 5m52s
This commit is contained in:
parent
4fd60e0600
commit
271022d36b
@ -13,6 +13,10 @@ if [ -z "${DOCKER_TAG:-}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Normalisation du tag pour Docker (sécurité côté script)
|
||||||
|
DOCKER_TAG=${DOCKER_TAG##*/}
|
||||||
|
DOCKER_TAG=$(printf "%s" "$DOCKER_TAG" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9_.-]/-/g')
|
||||||
|
|
||||||
echo "[docker] registry=${REGISTRY} namespace=${NAMESPACE} tag=${DOCKER_TAG}"
|
echo "[docker] registry=${REGISTRY} namespace=${NAMESPACE} tag=${DOCKER_TAG}"
|
||||||
|
|
||||||
if ! command -v docker >/dev/null 2>&1; then
|
if ! command -v docker >/dev/null 2>&1; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user