diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 03c2515f2..f4409d00c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -30,11 +30,25 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract Versions + id: versions + run: | + VERSION=$(awk -F '"' '/^version/ {print $2}' Cargo.toml) + echo "PUMPKIN_VERSION=$(echo $VERSION | cut -d '+' -f 1)" >> $GITHUB_ENV + echo "MC_VERSION=$(echo $VERSION | cut -d '+' -f 2)" >> $GITHUB_ENV + - name: Extract Metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=raw,value=latest + type=sha + type=raw,value=mc${{ env.MC_VERSION }} + type=raw,value=${{ env.PUMPKIN_VERSION }} + type=raw,value=mc${{ env.MC_VERSION }}-${{ env.PUMPKIN_VERSION }} - name: Docker Buildx uses: docker/setup-buildx-action@v3