Skip to content

Commit 28e5026

Browse files
committed
bring back docker builder
1 parent 88d049c commit 28e5026

File tree

1 file changed

+33
-9
lines changed

1 file changed

+33
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy to Render
1+
name: Deploy to Docker Hub and Render
22

33
on:
44
push:
@@ -8,16 +8,40 @@ on:
88
- '**.md'
99

1010
jobs:
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 }}

0 commit comments

Comments
 (0)