File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Images
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ build-and-push :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write
13+ packages : read
14+
15+ steps :
16+ - name : Checkout repo
17+ uses : actions/checkout@v3
18+
19+ - name : Log in to GitHub Container Registry
20+ uses : docker/login-action@v2
21+ with :
22+ registry : ghcr.io
23+ username : ${{ github.actor }}
24+ password : ${{ secrets.GITHUB_TOKEN }}
25+
26+ - name : Build and push server image
27+ uses : docker/build-push-action@v5
28+ with :
29+ context : ./server
30+ file : ./server/Dockerfile
31+ push : true
32+ tags : ghcr.io/${{ github.repository }}/server:latest
33+
34+ - name : Build and push client image
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : ./client
38+ file : ./client/Dockerfile
39+ push : true
40+ tags : ghcr.io/${{ github.repository }}/client:latest
You can’t perform that action at this time.
0 commit comments