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:
1818 steps :
1919 - uses : actions/checkout@v4
2020
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
2332 with :
2433 username : ${{ secrets.DOCKER_USERNAME }}
2534 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
2942 push : ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') && 'true' || 'false' }}
You can’t perform that action at this time.
0 commit comments