Skip to content

Merge pull request #105 from Hanna-Hinn/main #134

Merge pull request #105 from Hanna-Hinn/main

Merge pull request #105 from Hanna-Hinn/main #134

Workflow file for this run

name: Update Render deployment
on:
push:
branches:
- main
jobs:
update-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Authenticate with Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: docker.io/atallah0/backend-final-4-app:latest
- name: Update Render deployment
run: |
curl -X PUT https://api.render.com/v1/deploys/${{ secrets.DEPLOYMENT_ID }} \
-H "Authorization: Bearer ${{ secrets.RENDER_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"image": "docker.io/atallah0/backend-final-4-app:latest"
}'