azerothcore - 如何使 fork master 分支与 azerothcore master 分支保持同步
问题描述
如何自动使我的 fork master 分支与 AzerothCore master 分支保持同步?
解决方案
您可以使用 GitHub Actions 使您的 fork master 分支保持同步:
on:
schedule:
- cron: "0 */6 * * *"
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- name: repo-sync
uses: wei/git-sync@v2
with:
source_repo: "https://github.com/azerothcore/azerothcore-wotlk.git"
source_branch: "master"
destination_repo: "https://${{ secrets.GH_USERNAME }}:${{ secrets.GH_TOKEN }}@github.com/${{ secrets.GH_USERNAME }}/azerothcore-wotlk.git"
destination_branch: "master"
在 fork 存储库设置中创建秘密。您可以在此处参考如何添加它们: https ://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-一个存储库
就我而言,我创造了秘密GH_USERNAME
和GH_TOKEN
GH_USERNAME
应设置为您的 github 用户名。
GH_TOKEN
应设置为您创建的个人访问令牌。
有关如何创建的信息,请参阅此处: https ://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
推荐阅读
- batch-file - 从 .lnk 快捷方式文件 (cmd | .bat) 中获取目标文件的路径
- java - 如何replyChannel为false或null?
- c# - ASP.NET Core ToHtmlString
- python - OverFlowError:数学范围错误 javaScript 到 python
- python - Python 在 Windows 上发送 SIGINT 信号子进程
- xcode - Xcode 快速帮助未显示
- laravel - IE11 无法访问此页面,但该页面有效且可访问
- spring - 使用 Spring Data Projection 进行过滤
- r - 网格在控制台中运行时找到字体,但在渲染 Rmd 时没有
- jolt - 坚持简单的颠簸转换