【问题标题】:How to commit output from private workflow to another public repo如何将私有工作流的输出提交到另一个公共仓库
【发布时间】:2021-09-11 17:18:19
【问题描述】:

我需要将我的私人回购工作流 (github-actions) 的输出提交到公共回购,这可能吗?

【问题讨论】:

  • 您能否提供更多有关上下文的详细信息,您尝试了什么以及您想要做什么? :)

标签: git github github-actions


【解决方案1】:

这应该可以使用标准的 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 命令不在我的脑海中;在一切顺利之前,您可能需要对这些进行试运行。

【讨论】:

  • 嗨,我试过这个得到“错误:进程完成,退出代码 1”
  • 然后检查控制台输出。找出哪些命令触发了错误,以及错误消息是什么。正如我所说,您可能希望对它们进行试运行(例如,在本地系统上针对虚拟存储库尝试它们)以确保一切顺利。
  • 知道了。谢谢:)
猜你喜欢
  • 2011-04-20
  • 1970-01-01
  • 1970-01-01
  • 2011-12-20
  • 2013-10-03
  • 1970-01-01
  • 1970-01-01
  • 2011-06-21
相关资源
最近更新 更多