Skip to content

Commit d207347

Browse files
committed
ci: fix create docker image based on reference instead of branch
1 parent 2f62b1d commit d207347

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/release-automated.yml

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6969
flavor: |
7070
latest=${{ steps.branch.outputs.branch_name == 'master' }}
71+
tags: |
72+
type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }}
7173
- name: Build and push Docker image
7274
uses: docker/build-push-action@v2
7375
with:

.github/workflows/release-manual-docker.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
flavor: |
4646
latest=${{ steps.branch.outputs.branch_name == 'master' && github.event.inputs.ref == '' }}
4747
tags: |
48-
type=semver,enable=true,priority=900,pattern={{version}},value=${{ github.event.inputs.ref }}
49-
type=raw,enable=${{ github.event.inputs.ref == '' }},priority=600,value=latest
48+
type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }}
49+
type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest
5050
- name: Build and push Docker image
5151
uses: docker/build-push-action@v2
5252
with:

0 commit comments

Comments
 (0)