File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ workflow_run :
5
+ workflows :
6
+ - Merge to Main Branch
7
+ types :
8
+ - completed
9
+
10
+ jobs :
11
+ build-and-push-docker-image :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Setting Up QEMU
15
+ uses : docker/setup-qemu-action@v2
16
+
17
+ - name : Setting Up Docker Buildx
18
+ uses : docker/setup-buildx-action@v2
19
+
20
+ - name : Login to Docker Hub
21
+ uses : docker/login-action@v2
22
+ with :
23
+ username : ${{ github.repository_owner }}
24
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
25
+
26
+ - name : Checkout
27
+ uses : actions/checkout@v3
28
+ with :
29
+ fetch-depth : 0 # Required for github-action-get-previous-tag
30
+
31
+ - name : Get Latest Tag
32
+ id : get-tag
33
+ uses : WyriHaximus/github-action-get-previous-tag@v1
34
+ with :
35
+ fallback : v1.0.0
36
+
37
+ - name : Building and Pushing
38
+ uses : docker/build-push-action@v3
39
+ if : steps.get-tag.outputs.tag
40
+ with :
41
+ push : true
42
+ file : ./ci/Dockerfile
43
+ tags : |
44
+ ${{ github.repository }}:${{ steps.get-tag.outputs.tag }}
45
+ ${{ github.repository }}:latest
You can’t perform that action at this time.
0 commit comments