From 1efed6069678c473a3a3f5519cd9502bd7b1abed Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Sat, 3 Jan 2026 21:13:36 +0100 Subject: [PATCH] working on image retagging Signed-off-by: Stephan Richter --- .gitea/workflows/docker.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml index a68e4698..906e9c7f 100644 --- a/.gitea/workflows/docker.yaml +++ b/.gitea/workflows/docker.yaml @@ -27,6 +27,7 @@ jobs: - name: Re-tag the most recent image run: | + set -x REGISTRY="${{ secrets.REGISTRY_PATH }}" REPO="umbrella" USER="${{ secrets.DOCKER_USERNAME }}" @@ -35,14 +36,14 @@ jobs: NEW_TAG="${{ gitea.sha_short }}" # Get auth token (basic auth for most self-hosted registries) - TOKEN=$(curl -s -u "$USER:$PASS" "https://$REGISTRY/v2/token?service=$REGISTRY&scope=repository:$REPO:pull,push") - AUTH="Bearer $(echo $TOKEN | jq -r .token)" + #TOKEN=$(curl -s -u "$USER:$PASS" "https://$REGISTRY/v2/token?service=$REGISTRY&scope=repository:$REPO:pull,push") + #AUTH="Bearer $(echo $TOKEN | jq -r .token)" # Fetch latest manifest (specify mediaType header for OCI support) - MANIFEST=$(curl -s -H "Authorization: $AUTH" -H "Accept: application/vnd.docker.distribution.manifest.v2+json,application/vnd.oci.image.manifest.v1+json" "https://$REGISTRY/v2/$REPO/manifests/$LATEST" | jq -c .) + MANIFEST=$(curl -s -u "$USER:$PASS" -H "Accept: application/vnd.docker.distribution.manifest.v2+json,application/vnd.oci.image.manifest.v1+json" "https://$REGISTRY/v2/$REPO/manifests/$LATEST" | jq -c .) # PUT manifest under new tag - curl -X PUT -s -H "Authorization: $AUTH" -H "Content-Type: application/vnd.docker.distribution.manifest.v2+json" --data "$MANIFEST" "https://$REGISTRY/v2/$REPO/manifests/$NEW_TAG" + curl -X PUT -s -u "$USER:$PASS" -H "Content-Type: application/vnd.docker.distribution.manifest.v2+json" --data "$MANIFEST" "https://$REGISTRY/v2/$REPO/manifests/$NEW_TAG" echo "Tagged $REGISTRY/$REPO:$LATEST -> $NEW_TAG"