yym68686 commited on
Commit
535f873
·
1 Parent(s): 53eb9f9

update github action

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +35 -0
.github/workflows/main.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Docker Build and Publish Docker Image
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
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: Set up QEMU
17
+ uses: docker/setup-qemu-action@v1
18
+
19
+ - name: Set up Docker Buildx
20
+ uses: docker/[email protected]
21
+
22
+ - name: Login to Docker Hub
23
+ uses: docker/[email protected]
24
+ with:
25
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
26
+ password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
27
+
28
+ - name: Build and push Docker image
29
+ uses: docker/[email protected]
30
+ with:
31
+ context: .
32
+ file: Dockerfile.build
33
+ platforms: linux/amd64,linux/arm64
34
+ push: true
35
+ tags: yym68686/uni-api:latest