File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CD Pipeline
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - master
8+
9+ jobs :
10+ deploy :
11+ runs-on : ubuntu-latest
12+ needs : docker-build # Ensure CI (tests + docker build) passes first
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v3
17+
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v2
20+
21+ - name : Log in to GitHub Container Registry
22+ uses : docker/login-action@v2
23+ with :
24+ registry : ghcr.io
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Build & Push Driver Location Service Image
29+ uses : docker/build-push-action@v4
30+ with :
31+ context : .
32+ file : src/driver-location-service/Dockerfile
33+ push : true
34+ tags : |
35+ ghcr.io/${{ github.repository_owner }}/driver-location-service:latest
36+ ghcr.io/${{ github.repository_owner }}/driver-location-service:${{ github.sha }}
37+
38+ - name : Build & Push Dispatch Service Image
39+ uses : docker/build-push-action@v4
40+ with :
41+ context : .
42+ file : src/dispatch-service/Dockerfile
43+ push : true
44+ tags : |
45+ ghcr.io/${{ github.repository_owner }}/dispatch-service:latest
46+ ghcr.io/${{ github.repository_owner }}/dispatch-service:${{ github.sha }}
47+
48+ - name : Deployment Complete
49+ run : echo "🚀 Images successfully pushed to GitHub Container Registry!"
You can’t perform that action at this time.
0 commit comments