File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed
Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change 1- name : CI/CD Docker + Render
1+ name : CI/CD Docker Backend
22
33on :
44 push :
5- branches : [ deployrepo ] # Trigger on direct push to main
5+ branches : [ deployrepo ] # Trigger on direct push to deployrepo
66 pull_request :
7- branches : [ deployrepo ] # Trigger on PR targeting main
7+ branches : [ deployrepo ] # Trigger on PR targeting deployrepo
88
99jobs :
1010 build :
2727 - name : Build and push Docker image
2828 uses : docker/build-push-action@v5
2929 with :
30- context : .
30+ context : ./backend # <-- folder containing your backend Dockerfile
31+ file : ./backend/Dockerfile # <-- path to backend Dockerfile
3132 push : true
32- tags : ${{ secrets.DOCKER_USERNAME }}/zcoder-backend:latest
33-
34- deploy :
35- name : Deploy to Render
36- needs : build # Only runs if build passes
37- runs-on : ubuntu-latest
38-
39- steps :
40- - name : Checkout code
41- uses : actions/checkout@v3
42-
43- - name : Deploy to Render
44- uses : johnbeynon/render-deploy-action@v0.0.8
45- with :
46- service-id : ${{ secrets.SERVICE_ID }}
47- api-key : ${{ secrets.RENDER_API_KEY }}
33+ tags : |
34+ ${{ secrets.DOCKER_USERNAME }}/zcoder-backend:latest
35+ ${{ secrets.DOCKER_USERNAME }}/zcoder-backend:${{ github.sha }}
You can’t perform that action at this time.
0 commit comments