File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-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+ docker-build-push :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v4
13+
14+ - name : Login to Docker Hub
15+ uses : docker/login-action@v3
16+ with :
17+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
18+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
19+
20+ - name : Build and push backend
21+ uses : docker/build-push-action@v5
22+ with :
23+ context : ./packages/backend
24+ push : true
25+ tags : ${{ secrets.DOCKER_HUB_USERNAME }}/backend:latest
26+
27+ - name : Build and push frontend
28+ uses : docker/build-push-action@v5
29+ with :
30+ context : ./packages/frontend
31+ push : true
32+ tags : ${{ secrets.DOCKER_HUB_USERNAME }}/frontend:latest
You can’t perform that action at this time.
0 commit comments