🔒 Repository is read-only – file editing is disabled.
1234567891011121314
#!/bin/bash
# post-receive hook – wywołuje webhook Flask po push do recipes.git
# Instalacja: cp do /var/git/recipes.git/hooks/post-receive && chmod +x
SECRET="pag_hook_6f8a2e1d4c9b3f7e"
URL="http://127.0.0.1:8000/build/api/git-hook"
while read oldrev newrev refname; do
REPO=$(basename "$(pwd)" .git)
curl -s -X POST "$URL" \
-H "Content-Type: application/json" \
-d "{\"secret\":\"$SECRET\",\"repo\":\"$REPO\",\"ref\":\"$refname\"}" \
-o /dev/null &
done