19 行
519 B
PHP
19 行
519 B
PHP
<?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();
|