File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Docker Build and Push
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ env :
9+ PROJECT_NAME : ai-media2doc
10+
11+ jobs :
12+ build-and-push :
13+ name : Build and Push Docker Images
14+ runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ module : [backend, frontend]
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v3
21+
22+ - name : Login to Docker Hub
23+ uses : docker/login-action@v2
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+ - name : Set up QEMU
29+ uses : docker/setup-qemu-action@v3
30+
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v2
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v4
36+ with :
37+ context : ./${{ matrix.module }}
38+ file : ./${{ matrix.module }}/Dockerfile
39+ platforms : linux/amd64,linux/arm64
40+ push : true
41+ tags : |
42+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.PROJECT_NAME }}-${{ matrix.module }}:${{ github.ref_name }}
43+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.PROJECT_NAME }}-${{ matrix.module }}:latest
You can’t perform that action at this time.
0 commit comments