File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 55 branches : [ "master", "dev" ]
66 pull_request :
77 branches : [ "master", "dev" ]
8+ release :
9+ types : [ published ]
810
911jobs :
1012 build :
13+ if : github.event_name != 'release'
1114 runs-on : ubuntu-latest
1215 steps :
1316 - name : Login to Docker Hub
2326 uses : docker/build-push-action@v6
2427 with :
2528 push : true
26- tags : ${{ secrets.DOCKERHUB_USERNAME }}/ssh-key-authority:latest-${{ vars.GITHUB_REF_NAME }}
29+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/ssh-key-authority:latest-${{ github.ref_name }}
30+
31+ release :
32+ if : github.event_name == 'release'
33+ runs-on : ubuntu-latest
34+ steps :
35+ - name : Login to Docker Hub
36+ uses : docker/login-action@v3
37+ with :
38+ username : ${{ secrets.DOCKERHUB_USERNAME }}
39+ password : ${{ secrets.DOCKERHUB_TOKEN }}
40+
41+ - name : Set up Docker Buildx
42+ uses : docker/setup-buildx-action@v3
43+
44+ - name : Build and push release image
45+ uses : docker/build-push-action@v6
46+ with :
47+ push : true
48+ tags : |
49+ ${{ secrets.DOCKERHUB_USERNAME }}/ssh-key-authority:${{ github.event.release.tag_name }}
50+ ${{ secrets.DOCKERHUB_USERNAME }}/ssh-key-authority:latest
You can’t perform that action at this time.
0 commit comments