add docker-compose #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Docker Hub and Render | |
on: | |
push: | |
branches: | |
- retina # Triggers on every commit to this branch | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up QEMU (for multi-arch support) | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile # Explicitly specifying Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: seanyl/deepgit:app | |
deploy-to-render: | |
needs: build-and-push # Ensure this runs only after the Docker image is pushed | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Render Deployment | |
env: | |
RENDER_DEPLOY_HOOK: ${{ secrets.RENDER_DEPLOY_HOOK }} | |
run: | | |
if curl -X POST "$RENDER_DEPLOY_HOOK"; then | |
echo "Render deployment triggered successfully." | |
else | |
echo "Render deployment failed!" >&2 | |
exit 1 | |
fi |