File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1- name : Build and push Docker image to Docker Hub
1+ name : Build and push Docker images
22
33on :
44 push :
77jobs :
88 build :
99 runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ include :
13+ - name : api
14+ dockerfile : Dockerfile.api
15+ - name : worker
16+ dockerfile : Dockerfile.worker
1017
1118 steps :
12- - name : Check out the repo
19+ - name : Checkout code
1320 uses : actions/checkout@v4
1421
15- - name : Login to Docker Hub
22+ - name : Docker Hub login
1623 uses : docker/login-action@v3
1724 with :
1825 username : ${{ secrets.DOCKER_USER_NAME }}
19- password : ${{ secrets.DOCKER_SECERT }}
26+ password : ${{ secrets.DOCKER_SECRET }}
2027
21- - name : Build and push to Docker Hub
28+ - name : Build and push ${{ matrix.name }}
2229 uses : docker/build-push-action@v5
2330 with :
2431 context : .
32+ file : ${{ matrix.dockerfile }}
2533 push : true
26- tags : hydro2070/complier:latest
34+ tags : hydro2070/complier-${{ matrix.name }} :latest
You can’t perform that action at this time.
0 commit comments