Merge pull request #105 from Hanna-Hinn/main #134
This file contains 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: 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" | |
}' |