File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7- - v1.0
7+ pull_request :
8+ branches :
9+ - master
10+ release :
11+ types : [ published ]
812
913jobs :
1014 test :
2428 run : go test -v ./...
2529
2630 deploy :
31+ if : ${{ github.event_name == 'push' || github.event_name == 'release' }}
2732 needs : test
2833 runs-on : ubuntu-latest
2934 steps :
@@ -40,15 +45,15 @@ jobs:
4045 password : ${{ secrets.DOCKERHUB_TOKEN }}
4146
4247 - name : Build and push from mater
43- if : ${{ github.ref == 'refs/heads/master' }}
48+ if : ${{ github.event_name == 'push' && github. ref == 'refs/heads/master' }}
4449 uses : docker/build-push-action@v2
4550 with :
4651 push : true
4752 tags : updev/polkovnik-bot:latest
4853
49- - name : Build and push from v1
50- if : ${{ github.ref == 'refs/heads/v1.0 ' }}
54+ - name : Build and push by release
55+ if : ${{ github.event_name == 'release ' }}
5156 uses : docker/build-push-action@v2
5257 with :
5358 push : true
54- tags : updev/polkovnik-bot:v1
59+ tags : updev/polkovnik-bot:${{ github.event.release.tag_name }}
You can’t perform that action at this time.
0 commit comments