diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5caf18b..edd518d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -24,13 +24,16 @@ jobs: - linux/amd64 - linux/arm64 steps: + - name: REGISTRY_IMAGE + run: | + echo "REGISTRY_IMAGE=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: ${{ env.REGISTRY_IMAGE }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -48,7 +51,7 @@ jobs: context: . platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} - outputs: type=image,name=${{ github.repository }},push-by-digest=true,name-canonical=true,push=true + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true - name: Export digest run: | mkdir -p /tmp/digests @@ -67,6 +70,9 @@ jobs: needs: - build steps: + - name: REGISTRY_IMAGE + run: | + echo "REGISTRY_IMAGE=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} - name: Download digests uses: actions/download-artifact@v3 with: @@ -78,7 +84,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ github.repository }} + images: ${{ env.REGISTRY_IMAGE }} - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -89,7 +95,7 @@ jobs: working-directory: /tmp/digests run: | docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ github.repository }}@sha256:%s ' *) + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect ${{ github.repository }}:${{ steps.meta.outputs.version }} + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}