File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 47
47
username : ${{ env.DOCKERHUB_USERNAME }}
48
48
password : ${{ env.DOCKERHUB_TOKEN }}
49
49
50
+ - name : Extract Docker metadata
51
+ id : meta
52
+ uses : docker/metadata-action@v5
53
+ with :
54
+ images : ${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
55
+ tags : |
56
+ type=ref,event=branch
57
+ type=ref,event=tag
58
+ type=semver,pattern={{version}}
59
+ type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
60
+
50
61
- name : Get latest version tag
51
62
id : get_version
52
63
run : |
@@ -94,8 +105,11 @@ jobs:
94
105
with :
95
106
images : ${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
96
107
tags : |
97
- type=latest
98
- type=${{ steps.inc_version.outputs.new_version }}
108
+ type=ref,event=branch
109
+ type=ref,event=tag
110
+ type=semver,pattern={{version}}
111
+ type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
112
+ type=raw,value=${{ steps.inc_version.outputs.new_version }}
99
113
100
114
- name : Build and push Docker image
101
115
id : build-and-push
You can’t perform that action at this time.
0 commit comments