forked from aran159/python-cicd-kata
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (26 loc) · 910 Bytes
/
Copy pathdeploy.yml
File metadata and controls
33 lines (26 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: deploy.yml
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and tag image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/python-kata-wompwomp:latest .
- name: Push image
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/python-kata-wompwomp:latest
- name: Deploy to Render
env:
RENDER_WEBHOOK: ${{ secrets.DEPLOY_WEBHOOK_URL }}
IMAGE_URL: docker.io/${{ secrets.DOCKERHUB_USERNAME }}/python-kata-wompwomp:latest
run: |
curl "${DEPLOY_WEBHOOK_URL}&imgURL=docker.io%2Fwhatisthisboat%2Fpython-kata-wompwomp%3Alatest"