diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f3185ca..5ca518e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -68,14 +68,20 @@ jobs: # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action + - name: Set some variables for the image + run: | + echo "IMAGE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV + echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV - name: Build and push Docker image id: build-and-push uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + tags: | + ghcr.io/${{ env.IMAGE_NAME }}:latest + ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max