Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否支持设置只同步某些分支 #79

Open
lencx opened this issue Nov 5, 2020 · 7 comments
Open

能否支持设置只同步某些分支 #79

lencx opened this issue Nov 5, 2020 · 7 comments
Labels
feature New feature or request priority/wishlist

Comments

@lencx
Copy link

lencx commented Nov 5, 2020

例如:

steps:
- name: Mirror the Github organization repos to Gitee.
  uses: Yikun/hub-mirror-action@master
  with:
    # ...
    # 默认同步所有分支,如果设置branches,则同步以逗号分割的分支
    branches: 'a,b'
@yi-Xu-0100
Copy link
Contributor

因为是同步多个仓库,如果只同步某些分支,很难对单个仓库去指定。

建议直接单仓库设置定时脚本,推送部分分支到远程库

@lencx
Copy link
Author

lencx commented Nov 5, 2020

我认为这个扩展性的问题吧,如果该action只用于同步多个仓库,不细化,也是ok的。但是如果放在场景中,需求是千奇百怪的,每次去写脚本,也是复杂的。可以对单个仓库实现一些自定义不知道是否算一定的通用性?

@Yikun
Copy link
Owner

Yikun commented Nov 17, 2020

@lencx 能了解下仅同步某个分支具体的原始诉求是啥样的吗?

@lencx
Copy link
Author

lencx commented Nov 17, 2020

也可能只是我个人的需求,想把build后的文件目录推送到gitee上做一个镜像部署,并不希望将源码也同步到gitee。
peaceiris/actions-gh-pages是支持自动构建推送,但不支持推送gitee。而Yikun/hub-mirror-action支持的应该是多仓库定时同步。当时提issues的时候,是我没搞清楚该项目的定位,抱歉。

@Yikun
Copy link
Owner

Yikun commented Nov 17, 2020

@lencx : ),存在即合理哈。你现在用其他工具可以实现了吗?单个仓库指定分支同步的可以参考类似[1]中的action。

另外,对于批量的branch这个需求,可能在未来也会考虑,优先级很低。

[1] https://github.com/marketplace?type=actions&query=mirror

@Yikun Yikun added priority/wishlist feature New feature or request labels Nov 17, 2020
@lencx
Copy link
Author

lencx commented Nov 17, 2020

我目前暂未折腾了。谢谢你的参考[1],有时间再学习一下。

@Ir1d
Copy link

Ir1d commented Nov 18, 2021

我提一个场景, gitee 好像对 gh-pages 不会 gc,总是莫名其妙报错,所以会有只同步 master 分支的需求

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request priority/wishlist
Projects
None yet
Development

No branches or pull requests

4 participants