Create webhook for generated apps
This commit is contained in:
@@ -89,6 +89,27 @@ if grep -q '"message"' /tmp/appfactory-create-repo-response.json; then
|
|||||||
cat /tmp/appfactory-create-repo-response.json
|
cat /tmp/appfactory-create-repo-response.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Creating Gitea webhook..."
|
||||||
|
|
||||||
|
curl -sS -X POST \
|
||||||
|
"$GITEA_URL/api/v1/repos/$GITEA_ORG/$APP_ID/hooks" \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"type\": \"gitea\",
|
||||||
|
\"active\": true,
|
||||||
|
\"events\": [\"push\"],
|
||||||
|
\"config\": {
|
||||||
|
\"url\": \"$WEBHOOK_INTERNAL_URL\",
|
||||||
|
\"content_type\": \"json\",
|
||||||
|
\"secret\": \"$WEBHOOK_SECRET\"
|
||||||
|
}
|
||||||
|
}" > /tmp/appfactory-create-hook-response.json
|
||||||
|
|
||||||
|
if grep -q '"message"' /tmp/appfactory-create-hook-response.json; then
|
||||||
|
cat /tmp/appfactory-create-hook-response.json
|
||||||
|
fi
|
||||||
|
|
||||||
git init
|
git init
|
||||||
git branch -M main
|
git branch -M main
|
||||||
git remote add origin "$GITEA_URL/$GITEA_ORG/$APP_ID.git"
|
git remote add origin "$GITEA_URL/$GITEA_ORG/$APP_ID.git"
|
||||||
|
|||||||
Reference in New Issue
Block a user