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

ci: update sync action #324

Merged
merged 1 commit into from
Apr 1, 2023
Merged

ci: update sync action #324

merged 1 commit into from
Apr 1, 2023

Conversation

yorunning
Copy link
Contributor

@yorunning yorunning commented Apr 1, 2023

之前的同步代码有问题,因为TG908/fork-sync@v1.1已经不存在了。已经修复了这个问题并经过了测试,但是还有几个隐含的问题:

1.在同步后,相对于上游仓库会多一个提交记录,这会导致版本检测时使用领先一个提交的版本号;

p1
p2

2.默认生成的GITHUB_TOKEN没有更新workflow配置文件的权限,这意味着如果上游仓库中的其他的workflow配置文件(如:docker.yml)发生更新,下游仓库不能同步这些更新。

解决方法有两种:

  • 在下游仓库中创建一个拥有workflow权限的PAT(下游用户需要进行两个额外的配置操作,增加上手成本);
  • 遇到workflow配置文件更新的情况,手动仓库页面进行更新(其他的非workflow配置文件更新可以无感同步更新)。

p3

@vercel
Copy link

vercel bot commented Apr 1, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @Yidadaa on Vercel.

@Yidadaa first needs to authorize it.

@Yidadaa Yidadaa merged commit 44145f1 into ChatGPTNextWeb:main Apr 1, 2023
@huwan
Copy link

huwan commented Apr 1, 2023

关于权限的问题,或许可以在workflow文件里面使用`permissions: write-all来给GITHUB_TOKEN写权限或者更细粒度的权限。参考这里Assigning permissions to jobs

@yorunning
Copy link
Contributor Author

yorunning commented Apr 1, 2023

这个我也尝试过,工作流生成GITHUB_TOKEN没有更新其他工作流的权限,除非创建PAT

@yorunning
Copy link
Contributor Author

yorunning commented Apr 2, 2023

实际运行中是干净的fork不会产生问题一的情况。@Yidadaa

yxl pushed a commit to yxl/ChatGPT-Next-Web that referenced this pull request May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants