diff --git a/.gitea/workflows/image.yml b/.gitea/workflows/image.yml index 3089997..bf214c3 100644 --- a/.gitea/workflows/image.yml +++ b/.gitea/workflows/image.yml @@ -209,9 +209,11 @@ jobs: # Gitea cannot make a tag immutable, so look the version tag up first: when it # exists the build must not move it (the build step reads this marker). + accept='application/vnd.oci.image.index.v1+json' + accept="$accept, application/vnd.oci.image.manifest.v1+json" + accept="$accept, application/vnd.docker.distribution.manifest.v2+json" code="$(printf 'user = "%s:%s"\n' "$cred_user" "$cred_token" \ - | curl -sS -o /dev/null -w '%{http_code}' -I -K - \ - -H 'Accept: application/vnd.oci.image.index.v1+json, application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.v2+json' \ + | curl -sS -o /dev/null -w '%{http_code}' -I -K - -H "Accept: $accept" \ "https://${registry}/v2/${IMAGE_PATH}/manifests/${IMAGE_VERSION}" || true)" case "$code" in 200) touch /kaniko/version-published; echo "Version tag ${IMAGE_VERSION} is already published; it will not be moved." ;;