英文:
How to use a custom path for GitHub Actions workflow file?
问题
可以使用 GitHub Actions 的路径除了 /.github/workflows/action.yml
之外吗?
例如,我可以使用 /foo/bar/.github/workflows/action.yml
吗?
(根路径中没有 /.github/...
)
如果可以,我该如何实现这个目标?
我尝试创建 /foo/bar/.github/workflows/action.yml
但没有成功。
英文:
Is it possible to use GitHub Actions with a path other than /.github/workflows/action.yml
?
For example, can I use /foo/bar/.github/workflows/action.yml
?
(without /.github/...
in root path)
If so, how can I achieve this?
I tried creating /foo/bar/.github/workflows/action.yml
but it didn't work.
答案1
得分: 0
这是来自官方文档的摘录:
> 您必须将工作流文件存储在存储库的 .github/workflows 目录中。
这意味着您可以在.github/workflows
下有子文件夹,其中包含更多的工作流/操作,但路径的根必须是.github/workflows
。
英文:
This is the excerpt from the official documentation:
> You must store workflow files in the .github/workflows directory of your repository.
This means that you can have subfolders under .github/workflows
, which contain more workflows/actions, but the root of the path must be .github/workflows
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论