File tree 1 file changed +30
-10
lines changed
1 file changed +30
-10
lines changed Original file line number Diff line number Diff line change 1
- name : Test image build
1
+ name : ci
2
2
3
3
on :
4
4
pull_request :
5
- branches : [ master ]
5
+ push :
6
+ branches :
7
+ - master
8
+ tags :
9
+ - v*
6
10
7
11
jobs :
8
- build :
9
- name : Build docker image
10
-
12
+ publish :
11
13
runs-on : ubuntu-latest
12
14
13
15
steps :
14
- - name : Checkout
15
- uses : actions/checkout@v2
16
-
17
- - name : Build
18
- run : docker build .
16
+ - uses : actions/checkout@v2
17
+ - name : Prepare
18
+ id : prepare
19
+ run : |
20
+ TAG=${GITHUB_REF##*/}
21
+ echo ::set-output name=tag_name::${TAG}
22
+ - name : Set up QEMU
23
+ uses : docker/setup-qemu-action@v1
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v1
26
+ - name : Login do docker.io
27
+ run : docker login -u odidev -p ${{ secrets.DOCKER_TOKEN }}
28
+ - name : build and publish image
29
+ id : docker_build
30
+ uses : docker/build-push-action@v2
31
+ with :
32
+ context : .
33
+ file : ./Dockerfile
34
+ platforms : linux/amd64,linux/arm64
35
+ push : true
36
+ tags : |
37
+ odidev/dcind:${{ steps.prepare.outputs.tag_name }}
38
+ odidev/dcind:latest
You can’t perform that action at this time.
0 commit comments