Add Gitea webhook auto-deploy scripts and config template.
Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
18
public/gitea_webhook.php
普通文件
18
public/gitea_webhook.php
普通文件
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Gitea Web 钩子入口(仅 POST + 签名校验)
|
||||
* 配置:项目根目录 deploy/config.php(勿提交仓库)
|
||||
*/
|
||||
|
||||
$configFile = dirname(__DIR__) . '/deploy/config.php';
|
||||
if (!is_file($configFile)) {
|
||||
http_response_code(500);
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
echo 'Missing deploy/config.php — copy deploy/config.example.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
$config = require $configFile;
|
||||
require dirname(__DIR__) . '/deploy/WebhookDeploy.php';
|
||||
|
||||
(new WebhookDeploy($config))->handle();
|
||||
在新工单中引用
屏蔽一个用户