首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将私有工作流的输出提交到另一个公共存储库

如何将私有工作流的输出提交到另一个公共存储库
EN

Stack Overflow用户
提问于 2021-06-29 21:28:29
回答 1查看 30关注 0票数 0

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-29 21:41:57

使用标准git工具应该可以做到这一点。将类似以下内容添加到您的工作流中:

代码语言:javascript
复制
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命令是我想不到的;您可能想要进行一次演练,直到一切顺利进行。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68179665

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档