aboutsummaryrefslogtreecommitdiff
path: root/bin/hook/post-receive
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-17 16:49:57 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-17 16:49:57 -0400
commit6a2e555a0ae7a8cfb9225d1004b578eb7b715d3b (patch)
treee33cf3a523a84e5a449f207c3e27b256696a1241 /bin/hook/post-receive
parente2622959a2234c7679c5c3eb18ba8642a1ce3a13 (diff)
downloadpablotron.org-6a2e555a0ae7a8cfb9225d1004b578eb7b715d3b.tar.bz2
pablotron.org-6a2e555a0ae7a8cfb9225d1004b578eb7b715d3b.zip
add bin/hook/post-receive
Diffstat (limited to 'bin/hook/post-receive')
-rwxr-xr-xbin/hook/post-receive17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/hook/post-receive b/bin/hook/post-receive
new file mode 100755
index 0000000..63ff055
--- /dev/null
+++ b/bin/hook/post-receive
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#
+# Example post-receive hook for server-side git repository.
+#
+# Note: you'll need to populate HOOK_URL and HOOK_HMAC_KEY
+#
+
+# set sane error mode
+set -eu
+
+# set env vars
+export HOOK_URL='https://example.com/hooks/deploy'
+export HOOK_HMAC_KEY="omitted"
+
+# trigger webhook
+exec /data/www/pablotron.org/data/git/pablotron.org/bin/hook/fire.rb