File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 3
3
push :
4
4
branches :
5
5
- main
6
+ tags :
7
+ - v*
6
8
jobs :
7
9
build-latest :
8
10
runs-on : ubuntu-latest
16
18
with :
17
19
username : ${{ secrets.DOCKERHUB_USERNAME }}
18
20
password : ${{ secrets.DOCKERHUB_TOKEN }}
19
- - name : Build and push
21
+ - name : Build and push (main)
20
22
id : docker_build
23
+ if : github.ref == 'refs/heads/main'
21
24
uses : docker/build-push-action@v2
22
25
with :
26
+ platforms : linux/amd64,linux/arm64
23
27
push : true
24
28
tags : madflojo/tarmac:unstable
29
+ - name : Build and push (tag)
30
+ id : docker_build_tag
31
+ if : startsWith(github.ref, 'refs/tags/v')
32
+ uses : docker/build-push-action@v2
33
+ with :
34
+ platforms : linux/amd64,linux/arm64
35
+ push : true
36
+ # tag with the git tag v*
37
+ tags : madflojo/tarmac:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments