update ecr
This commit is contained in:
@@ -5,7 +5,7 @@ name: Backend EC - Modal Deployment
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['**']
|
branches: ["**"]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -94,7 +94,7 @@ jobs:
|
|||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--push
|
--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
|
needs: build-and-push
|
||||||
if: success() && github.event_name == 'push'
|
if: success() && github.event_name == 'push'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -122,8 +122,14 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
SIG="sha256=$(openssl dgst -sha256 -hmac "${WEBHOOK_SECRET}" "$PAYLOAD" | cut -d' ' -f2)"
|
SIG="sha256=$(openssl dgst -sha256 -hmac "${WEBHOOK_SECRET}" "$PAYLOAD" | cut -d' ' -f2)"
|
||||||
echo "check the webhook URL ${DEPLOY_WEBHOOK_URL}" | base64
|
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 "Content-Type: application/json" \
|
||||||
-H "X-Gitea-Signature: ${SIG}" \
|
-H "X-Gitea-Signature: ${SIG}" \
|
||||||
--data-binary "@${PAYLOAD}"
|
--data-binary "@${PAYLOAD}")
|
||||||
|
echo "==> Response:"
|
||||||
|
echo "$RESPONSE"
|
||||||
rm -f "$PAYLOAD"
|
rm -f "$PAYLOAD"
|
||||||
@@ -2,7 +2,7 @@ name: Deploy CD Server
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['**']
|
branches: ['main']
|
||||||
paths:
|
paths:
|
||||||
- 'workspace/sprint_1_2/CODEBASE/deps/implementation/CD_server/**'
|
- 'workspace/sprint_1_2/CODEBASE/deps/implementation/CD_server/**'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user