如何保持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-repo设置中创建机密。您可以在此处参考如何添加它们:https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-加密的机密存储库

在我的情况下,我创建了机密GH_USERNAMEGH_TOKEN

GH_USERNAME应设置为您的github用户名。

GH_TOKEN应该设置为您创建的个人访问令牌。

有关如何创建的信息,请参阅此处:https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

最新更新