diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000000..be5cd36a5c --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,40 @@ +name: Upstream Sync + +permissions: + contents: write + +on: + schedule: + - cron: "0 0 * * *" # every day + workflow_dispatch: + +jobs: + sync_latest_from_upstream: + name: Sync latest commits from upstream repo + runs-on: ubuntu-latest + if: ${{ github.event.repository.fork }} + + steps: + # Step 1: run a standard checkout action + - name: Checkout target repo + uses: actions/checkout@v3 + + # Step 2: run the sync action + - name: Sync upstream changes + id: sync + uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 + with: + upstream_sync_repo: jaywcjlove/linux-command + upstream_sync_branch: master + target_sync_branch: master + target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set + + # Set test_mode true to run tests instead of the true action!! + test_mode: false + + - name: Sync check + if: failure() + run: | + echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。" + echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork." + exit 1 diff --git a/README.md b/README.md index 3eccc26dd5..e7fae63a21 100644 --- a/README.md +++ b/README.md @@ -438,14 +438,14 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 James Wang - - Qliangw + + alfred Wang Jianing - - alfred + + Qliangw 沙漠之子 @@ -459,32 +459,32 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 wVVaTT - - Pan, Wen-Ming + + BingCoke Ein Verne - - BingCoke + + Pan, Wen-Ming RichardLCD - - Xingwen Zhang - - - Xrtero - - - YH + + gggwvg Dazhuangw - - shc + + YH + + + Xrtero + + + Xingwen Zhang sfwwslm @@ -498,6 +498,9 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 noodles2hg + + shc + myliwenbo @@ -540,9 +543,6 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 ghy - - gggwvg - gesty @@ -564,6 +564,9 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 dayday + + Rocher + 黑&蛋 @@ -651,9 +654,6 @@ https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/<命 snovey - - Rocher - Robigus diff --git a/template/contributors.ejs b/template/contributors.ejs index 08c2b67443..ca18d62623 100644 --- a/template/contributors.ejs +++ b/template/contributors.ejs @@ -75,14 +75,14 @@ James Wang - - Qliangw + + alfred Wang Jianing - - alfred + + Qliangw 沙漠之子 @@ -96,32 +96,32 @@ wVVaTT - - Pan, Wen-Ming + + BingCoke Ein Verne - - BingCoke + + Pan, Wen-Ming RichardLCD - - Xingwen Zhang - - - Xrtero - - - YH + + gggwvg Dazhuangw - - shc + + YH + + + Xrtero + + + Xingwen Zhang sfwwslm @@ -135,6 +135,9 @@ noodles2hg + + shc + myliwenbo @@ -177,9 +180,6 @@ ghy - - gggwvg - gesty @@ -201,6 +201,9 @@ dayday + + Rocher + 黑&蛋 @@ -288,9 +291,6 @@ snovey - - Rocher - Robigus