diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d11327f..0b69208 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -42,16 +42,24 @@ jobs: version: latest - name: Registry Authentication - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin - name: Build Image - run: docker buildx build ./${{ matrix.image }} --tag ${{ matrix.image }} --platform linux/amd64,linux/arm64 - - - name: Push Image + env: + IMAGE_ID: docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }} run: | - IMAGE_NAME=${{ matrix.image }} - IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker buildx build ./${{ matrix.image }} \ + --tag docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }} \ + --platform linux/amd64,linux/arm64 + + - name: Push Image + env: + IMAGE_ID: docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }} + run: | + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_ID $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION