V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
twfb
V2EX  ›  分享发现

由于私人 github actions 用完了, 所以在公开的 actions 里执行

  •  
  •   twfb · 2022-03-10 11:41:27 +08:00 · 1933 次点击
    这是一个创建于 785 天前的主题,其中的信息可能已经有所发展或是发生改变。

    佩服我自己的机智

    https://github.com/twfb/PublicActions

    6 条回复    2022-03-12 14:25:58 +08:00
    codehz
        1
    codehz  
       2022-03-10 12:11:53 +08:00 via Android
    (跑 action 容易被判滥用,之前几个跑 openwrt 编译的就被橄榄了
    twfb
        2
    twfb  
    OP
       2022-03-10 12:37:45 +08:00
    @codehz 之前找了个小号 专门生成 rss 现在跑了 5,389 个, 不过平均一个也就两分钟, 现在还正常使用
    kunkunzhang
        3
    kunkunzhang  
       2022-03-10 13:08:24 +08:00
    挺好的。感觉需要手动触发
    twfb
        4
    twfb  
    OP
       2022-03-10 13:28:39 +08:00
    @kunkunzhang 对 没法 push 触发, 写的定时, 之前有想法是, 私有库的 action 通过请求调用公开的然后执行, 应该可以节省私有库时间
    xiaji
        5
    xiaji  
       2022-03-12 11:44:39 +08:00
    调用 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
    twfb
        6
    twfb  
    OP
       2022-03-12 14:25:58 +08:00
    @xiaji 哈哈哈 这个我知道 定时用的 schedule
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2007 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 01:08 · PVG 09:08 · LAX 18:08 · JFK 21:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.