diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 03160e7..ce3d064 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -28,6 +28,16 @@ jobs: [worker.oci] max-parallelism = 2 + - name: Generate Image Tags + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.DOCKER_USER }}/${{ env.DOCKER_REPOSITORY }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -40,4 +50,5 @@ jobs: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: ${{ env.DOCKER_USER }}/${{ env.DOCKER_REPOSITORY }}:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}