feat: notify script
Deploy / deploy (push) Successful in 10s

This commit is contained in:
2026-09-02 20:07:59 +05:00
parent 627306a5c5
commit edc793e3aa
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -14,6 +14,10 @@ monitor:
script: scripts/mem.sh
refresh: 5
exec:
- name: notify
script: scripts/notify.sh
args: 1
arg_types: [text]
- name: greet
script: scripts/greet.sh
args: 2
+3
View File
@@ -0,0 +1,3 @@
BODY="{'text':$1}"
SIG=$(printf %s "$BODY" | openssl dgst -sha256 -hmac "a28b01dd9125753dc41945e4859b4e1007fa35305173451a" | awk '{print $2}')
curl -s -X POST http://127.0.0.1:8644/webhooks/gitea-deploy -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$BODY"