File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,25 @@ jobs:
18
18
steps :
19
19
- uses : actions/checkout@v4
20
20
21
- - name : Build and Push Docker Images
22
- uses : docker/build-push-action@v6
21
+ - name : Extract metadata for Docker
22
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
23
+ id : meta
24
+ uses : docker/metadata-action@v5
25
+ with :
26
+ images : codingteam/codingteam.org.ru
27
+ tags : type=ref,event=branch
28
+
29
+ - name : Login to Docker Hub
30
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
31
+ uses : docker/login-action@v3
23
32
with :
24
33
username : ${{ secrets.DOCKER_USERNAME }}
25
34
password : ${{ secrets.DOCKER_PASSWORD }}
26
- repository : codingteam/codingteam.org.ru
27
- tag_with_ref : true
28
- tags : latest
35
+
36
+ - name : Build and Push Docker Images
37
+ uses : docker/build-push-action@v6
38
+ with :
39
+ tags : |
40
+ ${{ steps.meta.outputs.tags }}
41
+ codingteam/codingteam.org.ru:latest
29
42
push : ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') && 'true' || 'false' }}
You can’t perform that action at this time.
0 commit comments