调用 github 接口,使用 curl post 触发,可定时
function main_handler () {
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token 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" \
https://api.github.com/repos/n0raml/rsschan/actions/workflows/main.yaml/dispatches \
-d '{"ref":"main"}'
}
#Authorization: token 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 替换 token 后面的 token 留着
#
https://api.github.com/repos/用户名 /rsschan/actions/workflows/main.yaml/dispatches