update ecr
All checks were successful
Backend EC - Modal Deployment / build-and-push (push) Successful in 10m7s
Backend EC - Modal Deployment / notify-deploy (push) Successful in 3s

This commit is contained in:
DatTT127
2026-07-20 00:59:34 +07:00
parent f40f47de10
commit 5df5f2da24
2 changed files with 11 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ name: Backend EC - Modal Deployment
on:
push:
branches: ['**']
branches: ["**"]
workflow_dispatch: {}
permissions:
@@ -94,7 +94,7 @@ jobs:
--platform linux/amd64 \
--push
notify-deploy:
notify-deploy: # notify-deploy is the "ring the doorbell" that tells your Lightsail server "new image is ready, go fetch it and restart."
needs: build-and-push
if: success() && github.event_name == 'push'
runs-on: ubuntu-latest
@@ -122,8 +122,14 @@ jobs:
EOF
SIG="sha256=$(openssl dgst -sha256 -hmac "${WEBHOOK_SECRET}" "$PAYLOAD" | cut -d' ' -f2)"
echo "check the webhook URL ${DEPLOY_WEBHOOK_URL}" | base64
curl -X POST "${DEPLOY_WEBHOOK_URL}" \
echo "==> Payload:"
cat "$PAYLOAD"
echo ""
echo "==> Signature: ${SIG}"
RESPONSE=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X POST "${DEPLOY_WEBHOOK_URL}" \
-H "Content-Type: application/json" \
-H "X-Gitea-Signature: ${SIG}" \
--data-binary "@${PAYLOAD}"
--data-binary "@${PAYLOAD}")
echo "==> Response:"
echo "$RESPONSE"
rm -f "$PAYLOAD"

View File

@@ -2,7 +2,7 @@ name: Deploy CD Server
on:
push:
branches: ['**']
branches: ['main']
paths:
- 'workspace/sprint_1_2/CODEBASE/deps/implementation/CD_server/**'