【发布时间】:2022-01-25 17:38:28
【问题描述】:
在 GitHub 操作的工作流程结束时,“隐藏”“发布”作业似乎正在运行,我似乎无法弄清楚如何忽略或覆盖它。例如,actions/checkout@v2 操作完成后似乎会运行以下内容:
Post job cleanup.
/usr/bin/git version
git version 2.25.1
/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
但是,我只想简单地从我的自托管运行器中删除整个存储库。目录中只是一个简单的rm -rf。
我试图将其作为一个步骤添加到我的 .yml 文件中,但这似乎破坏了在我的整个工作流程完成后运行的 actions/checkout@v2 步骤。
如何在工作流完成后完全清理自托管运行的存储库?
【问题讨论】:
-
查看结帐操作的来源,我看不到覆盖发布作业的方法,但是如果您真的需要这个,那么您可以分叉该操作并删除发布作业或进行会跳过它的参数。
标签: github github-actions