From f597662201ab2b08d47ebda1d9d1b576ced6f733 Mon Sep 17 00:00:00 2001 From: HaimKortovich Date: Wed, 1 Apr 2026 11:45:42 -0500 Subject: [PATCH] strip https in registry --- .gitea/workflows/build-and-publish.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index f95b706..b9381c8 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -42,11 +42,15 @@ jobs: - name: Tag and Push Docker Image run: | VERSION=${{ github.run_number }} - TARGET_IMAGE=${{ github.server_url }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - - # Auto-detect the built image name - SOURCE_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" | head -n 1) - + + # Strip https from server URL + REGISTRY=${GITHUB_SERVER_URL#https://} + + TARGET_IMAGE=$REGISTRY/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + + # Auto-detect the built image name (better version) + SOURCE_IMAGE=$(docker load < result | awk '{print $3}') + docker tag $SOURCE_IMAGE $TARGET_IMAGE:$VERSION docker tag $SOURCE_IMAGE $TARGET_IMAGE:latest docker push $TARGET_IMAGE:$VERSION