File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main # or the branch you want to trigger on
7
+
8
+ jobs :
9
+ build-and-push :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Log in to GitHub Container Registry
17
+ run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
18
+
19
+ - name : Set up QEMU
20
+ uses : docker/setup-qemu-action@v2
21
+ with :
22
+ platforms : arm64, amd64
23
+
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v2
26
+ with :
27
+ install : true
28
+
29
+ - name : Build and push Docker image
30
+ uses : docker/build-push-action@v4
31
+ with :
32
+ context : .
33
+ file : ./Dockerfile
34
+ push : true
35
+ tags : ghcr.io/${{ github.repository_owner }}/ktx-qvm:latest
36
+ platforms : linux/amd64, linux/arm64
37
+
38
+ - name : Log out from GitHub Container Registry
39
+ run : docker logout ghcr.io
You can’t perform that action at this time.
0 commit comments