Skip to content

Github Actions

常用Actions

Checkout

Text Only
1
2
3
persist-credentials: "false" # 目测也能解决[Git Submodule同步](Git%20Submodule同步.md)中串token的问题
fetch-depth: "0" # 默认构建都是只拉最新的commit,如果要拉完整的历史设置为0
submodules: "recursive" # 递归拉取submodule

ssh-key一般要配置Deploy keys,感觉使用token配置PAT更灵活。

Cache

artifacts

环境变量

比如触发workflow的hash可以用github.sha或者GITHUB_SHA

徽章

  • Github默认提供的只有一种
  • Shields.io提供了五花八门的各类图标

ref