File tree Expand file tree Collapse file tree 1 file changed +33
-9
lines changed
Expand file tree Collapse file tree 1 file changed +33
-9
lines changed Original file line number Diff line number Diff line change 1- name : Deploy to Render
1+ name : Deploy to Docker Hub and Render
22
33on :
44 push :
88 - ' **.md'
99
1010jobs :
11- deploy :
11+ build-and-push :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v3
17+
18+ - name : Set up QEMU
19+ uses : docker/setup-qemu-action@v2
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v2
23+
24+ - name : Log in to Docker Hub
25+ uses : docker/login-action@v2
26+ with :
27+ username : ${{ secrets.DOCKERHUB_USERNAME }}
28+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
29+
30+ - name : Build and push Docker image
31+ uses : docker/build-push-action@v4
32+ with :
33+ context : .
34+ platforms : linux/amd64
35+ push : true
36+ tags : seanyl/deepgit:app
37+
38+ deploy-to-render :
39+ needs : build-and-push # Ensure this runs only after the Docker image is pushed
1240 runs-on : ubuntu-latest
1341
1442 steps :
1543 - name : Trigger Render Deployment
16- env :
17- RENDER_DEPLOY_HOOK : ${{ secrets.RENDER_DEPLOY_HOOK }}
1844 run : |
19- if [[ -z "$RENDER_DEPLOY_HOOK" ]]; then
20- echo "Error: RENDER_DEPLOY_HOOK is not set."
21- exit 1
22- fi
23- curl -X POST "$RENDER_DEPLOY_HOOK" || { echo "Render deployment trigger failed"; exit 1; }
45+ curl -X POST "$RENDER_DEPLOY_HOOK"
46+ env :
47+ RENDER_DEPLOY_HOOK : ${{ secrets.RENDER_DEPLOY_HOOK }}
You can’t perform that action at this time.
0 commit comments