Skip to content

Commit e48c132

Browse files
committed
Trigger digital ocean redeploy whenever an image is pushed
1 parent 6f15e32 commit e48c132

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/prod_container_img.yml

+15
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,18 @@ jobs:
7878
echo VERSION=$VERSION
7979
podman tag $IMAGE_NAME $IMAGE_ID:$VERSION
8080
podman push $IMAGE_ID:$VERSION
81+
82+
trigger-redeploy:
83+
name: Trigger Redeploy
84+
runs-on: ubuntu-24.04
85+
needs: [build]
86+
steps:
87+
- name: Install jq
88+
run: sudo apt-get install jq
89+
- name: Trigger
90+
run: |
91+
curl -X POST \
92+
-H "Content-Type: application/json" \
93+
-H "Authorization: Bearer ${{ secrets.DIGITALOCEAN_TOKEN }}" \
94+
"https://api.digitalocean.com/v2/apps/${{ secrets.DIGITALOCEAN_APP_ID }}/deployments" \
95+
| jq '.deployment.id' | grep -v null > /dev/null

0 commit comments

Comments
 (0)