diff --git a/.github/workflows/release-release_candidate.yml b/.github/workflows/release-release_candidate.yml index b5019c47b..3764f88ac 100644 --- a/.github/workflows/release-release_candidate.yml +++ b/.github/workflows/release-release_candidate.yml @@ -89,9 +89,13 @@ jobs: uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + # Automatically prepare image tags; + # semver patter will generate tags like these for example :v1 :v1.2 tags: | type=raw,value=latest type=raw,value=${{ env.REF_NAME }} + type=semver,pattern=v{{major}} + type=semver,pattern=v{{major}}.{{minor}} - name: Build and push Docker image uses: docker/build-push-action@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31f6d9f4a..f2971db5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,9 +90,13 @@ jobs: uses: docker/metadata-action@v4 with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} + # Automatically prepare image tags; + # semver patter will generate tags like these for example :v1 :v1.2 tags: | type=raw,value=latest type=raw,value=${{ env.REF_NAME }} + type=semver,pattern=v{{major}} + type=semver,pattern=v{{major}}.{{minor}} - name: Build and push Docker image uses: docker/build-push-action@v4