@@ -6,11 +6,11 @@ inputs:
66 docker-registry :
77 description : ' Docker Registry'
88 required : true
9- default : ' staffbase.jfrog.io '
9+ default : ' registry. staffbase.com '
1010 docker-registry-api :
1111 description : ' Docker Registry API'
1212 required : false
13- default : ' https://staffbase.jfrog.io/artifactory/api/docker /'
13+ default : ' https://registry. staffbase.com/v2 /'
1414 docker-image :
1515 description : ' Docker Image'
1616 required : true
@@ -175,17 +175,13 @@ runs:
175175 CHECK_EXISTING_TAGS="master-${GITHUB_SHA::8} main-${GITHUB_SHA::8}"
176176 CONTENT_TYPE="application/vnd.docker.distribution.manifest.v2+json"
177177
178- # split docker-image on / into repository and image
179- REPO=$(echo ${{ inputs.docker-image}} | cut -d'/' -f1)
180- IMAGE=$(echo ${{ inputs.docker-image}} | cut -d'/' -f2)
181-
182178 echo "CHECK_EXISTING_TAGS: ${CHECK_EXISTING_TAGS}"
183179 echo "RELEASE_TAG: ${RELEASE_TAG:1}"
184180 echo "Check if an image already exists for ${{ inputs.docker-image }}:main|master-${GITHUB_SHA::8} 🐋 ⬇"
185181
186182 MANIFEST=""
187183 for tag in $CHECK_EXISTING_TAGS; do
188- MANIFEST=$(curl -H "Accept: ${CONTENT_TYPE}" -u " ${{ inputs.docker-username }}:${{ inputs.docker-password }}" "${{ inputs.docker-registry-api }}${REPO}/v2/{$IMAGE }/manifests/${tag}")
184+ MANIFEST=$(curl -H "Accept: ${CONTENT_TYPE}" -u ' ${{ inputs.docker-username }}:${{ inputs.docker-password }}' "${{ inputs.docker-registry-api }}${{ inputs.docker-image} }/manifests/${tag}")
189185
190186 if [[ $MANIFEST == *"errors"* ]]; then
191187 echo "No image found for ${{ inputs.docker-image }}:${tag} 🚫"
@@ -199,8 +195,8 @@ runs:
199195 done
200196
201197 echo "Retagging image with release version and :latest tags for ${{ inputs.docker-image }} 🏷"
202- curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u " ${{ inputs.docker-username }}:${{ inputs.docker-password }}" -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${REPO}/v2/{$IMAGE }/manifests/${{ steps.preparation.outputs.tag }}"
203- curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u " ${{ inputs.docker-username }}:${{ inputs.docker-password }}" -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${REPO}/v2/{$IMAGE }/manifests/${{ steps.preparation.outputs.latest }}"
198+ curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u ' ${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image} }/manifests/${{ steps.preparation.outputs.tag }}"
199+ curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u ' ${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image} }/manifests/${{ steps.preparation.outputs.latest }}"
204200
205201 - name : Checkout GitOps Repository
206202 if : inputs.gitops-token != ''
0 commit comments