用命令行操作 GitHub Actions

2021 年 10 月 10 日
 AndyAO

总感觉 GitHub Actions 用起来很麻烦,因为需要去网页上操作,最近发现是可以用 CLI 的,今天 4 月才有这种功能。

https://github.blog/changelog/2021-04-15-github-cli-1-9-enables-you-to-work-with-github-actions-from-your-terminal/

2522 次点击
所在节点    程序员
6 条回复
stille
2021 年 10 月 10 日
如果是单纯触发,可以配置 on workflow_dispatch,curl api v3 来触发
AndyAO
2021 年 10 月 10 日
@stille 有 GitHub 官方提供的 CLI,比自己用 curl 触发方便很多,感觉这是舍近求远
zhaiblog
2021 年 10 月 10 日
要是能提供调试功能就好了,不然有时候写个 workflow 要 commit 好几次去调试
AndyAO
2021 年 10 月 10 日
@zhaiblog 可以直接用命令行触发,例如,gh workflow run pytest.yml ,commit 这种方式会破坏历史记录。
stille
2021 年 10 月 10 日
@AndyAO #2 主要有些触发可能要丢到脚本里,并不是每台服务器都装了 cli
AndyAO
2021 年 10 月 10 日
@stille 懂了😯

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/806797

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX