Skip to content

Commit 72f3ea8

Browse files
committed
👷 Add deploy webhook call
1 parent 2d829aa commit 72f3ea8

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/CI-CD.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ jobs:
2424
packages: write
2525
id-token: write
2626
uses: ./.github/workflows/docker.yaml
27+
28+
deploy:
29+
needs: docker
30+
uses: ./.github/workflows/deploy.yaml
31+
secrets: inherit

.github/workflows/deploy.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Call Endpoint
2+
3+
on: workflow_call
4+
5+
jobs:
6+
call-endpoint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check if DEPLOY_URL is set and call endpoint
10+
run: |
11+
if [ -n "${{ secrets.DEPLOY_URL }}" ]; then
12+
curl -X POST -H "Content-Type: application/json" -d '{"text":"Image updated"}' "${{ secrets.DEPLOY_URL }}"
13+
else
14+
echo "DEPLOY_URL is not set. Skipping."
15+
fi

0 commit comments

Comments
 (0)