【发布时间】:2021-09-11 17:18:19
【问题描述】:
我需要将我的私人回购工作流 (github-actions) 的输出提交到公共回购,这可能吗?
【问题讨论】:
-
您能否提供更多有关上下文的详细信息,您尝试了什么以及您想要做什么? :)
标签: git github github-actions
我需要将我的私人回购工作流 (github-actions) 的输出提交到公共回购,这可能吗?
【问题讨论】:
标签: git github github-actions
这应该可以使用标准的 git 工具来实现。在您的工作流程中添加类似的内容:
cd wherever_your_output_resides
# clone the public repo, or pull if we have a clone already
git pull origin || git clone <url> .
# check out the desired branch (optional)
git checkout some_branch
# stage output
# (you may need to tweak this, e.g. to include files not in the index yet)
git add --all
# commit
git commit -m "<message for the commit>"
# push to the remote repo
git push origin
git 命令不在我的脑海中;在一切顺利之前,您可能需要对这些进行试运行。
【讨论】: