diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 27d33c8..8ae6e02 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -10,7 +10,6 @@ on: branches: ["main"] workflow_dispatch: env: - GHCR_IMAGE: ghcr.io/c4illin/convertx IMAGE_NAME: ${{ github.repository }} DOCKERHUB_USERNAME: c4illin @@ -53,11 +52,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: downcase REPO + run: | + echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" + - name: Docker meta default id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.GHCR_IMAGE }} + images: ghcr.io/${{ env.REPO }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -82,7 +85,7 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} annotations: ${{ steps.meta.outputs.annotations }} - outputs: type=image,name=${{ env.GHCR_IMAGE }},push-by-digest=true,name-canonical=true,push=true,oci-mediatypes=true + outputs: type=image,name=ghcr.io/${{ env.REPO }},push-by-digest=true,name-canonical=true,push=true,oci-mediatypes=true cache-from: type=gha,scope=${{ matrix.platform }} cache-to: type=gha,mode=max,scope=${{ matrix.platform }} @@ -119,12 +122,16 @@ jobs: pattern: digests-* merge-multiple: true + - name: downcase REPO + run: | + echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v5 with: images: | - ${{ env.GHCR_IMAGE }} + ghcr.io/${{ env.REPO }} ${{ env.IMAGE_NAME }} - name: Set up Docker Buildx @@ -157,8 +164,8 @@ jobs: --annotation='index:org.opencontainers.image.created=${{ steps.timestamp.outputs.timestamp }}' \ --annotation='index:org.opencontainers.image.url=${{ github.event.repository.url }}' \ --annotation='index:org.opencontainers.image.source=${{ github.event.repository.url }}' \ - $(printf '${{ env.GHCR_IMAGE }}@sha256:%s ' *) + $(printf 'ghcr.io/${{ env.REPO }}@sha256:%s ' *) - name: Inspect image run: | - docker buildx imagetools inspect '${{ env.GHCR_IMAGE }}:${{ steps.meta.outputs.version }}' + docker buildx imagetools inspect 'ghcr.io/${{ env.REPO }}:${{ steps.meta.outputs.version }}'