From 7f59fa35c72892531fb9d63fa9dc795743191635 Mon Sep 17 00:00:00 2001 From: shzhxh Date: Wed, 1 Jun 2022 17:06:56 +0800 Subject: [PATCH] sync different hubs at different time --- ...core-os.yml => sync-rcore-os-to-gitee.yml} | 18 +-------------- .../workflows/sync-rcore-os-to-gitlink.yml | 23 +++++++++++++++++++ .../{sync-to-gitee.yml => sync-shzhxh.yml} | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) rename .github/workflows/{sync-rcore-os.yml => sync-rcore-os-to-gitee.yml} (53%) create mode 100644 .github/workflows/sync-rcore-os-to-gitlink.yml rename .github/workflows/{sync-to-gitee.yml => sync-shzhxh.yml} (98%) diff --git a/.github/workflows/sync-rcore-os.yml b/.github/workflows/sync-rcore-os-to-gitee.yml similarity index 53% rename from .github/workflows/sync-rcore-os.yml rename to .github/workflows/sync-rcore-os-to-gitee.yml index 6c29249..10fea6c 100644 --- a/.github/workflows/sync-rcore-os.yml +++ b/.github/workflows/sync-rcore-os-to-gitee.yml @@ -1,4 +1,4 @@ -name: Sync rcore-os Repos +name: Sync rcore-os to gitee on: schedule: @@ -22,19 +22,3 @@ jobs: force_update: true # 启用后,强制同步,即强制覆盖目的端仓库 timeout: '600s' # git超时设置,超时后会自动重试git操作 - gitlink: - runs-on: ubuntu-20.04 - steps: - - - name: Sync Github Repos To Gitlink - uses: shzhxh/hub-mirror-action@master - with: - src: github/rcore-os # 源端账户名(github) - dst: gitlink/rcore-os # 目的端账户名(gitee) - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} # SSH密钥对中的私钥 - account_type: org # 账户类型 - clone_style: "https" # 使用https方式进行clone,也可以使用ssh - debug: true # 启用后会显示所有执行命令 - force_update: true # 启用后,强制同步,即强制覆盖目的端仓库 - timeout: '600s' # git超时设置,超时后会自动重试git操作 - diff --git a/.github/workflows/sync-rcore-os-to-gitlink.yml b/.github/workflows/sync-rcore-os-to-gitlink.yml new file mode 100644 index 0000000..6637977 --- /dev/null +++ b/.github/workflows/sync-rcore-os-to-gitlink.yml @@ -0,0 +1,23 @@ +name: Sync rcore-os to gitlink + +on: + schedule: + - cron: '30 20 * * *' # Beijing Time 04:30 + +jobs: + gitlink: + runs-on: ubuntu-20.04 + steps: + + - name: Sync Github Repos To Gitlink + uses: shzhxh/hub-mirror-action@master + with: + src: github/rcore-os # 源端账户名(github) + dst: gitlink/rcore-os # 目的端账户名(gitee) + dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} # SSH密钥对中的私钥 + account_type: org # 账户类型 + clone_style: "https" # 使用https方式进行clone,也可以使用ssh + debug: true # 启用后会显示所有执行命令 + force_update: true # 启用后,强制同步,即强制覆盖目的端仓库 + timeout: '600s' # git超时设置,超时后会自动重试git操作 + diff --git a/.github/workflows/sync-to-gitee.yml b/.github/workflows/sync-shzhxh.yml similarity index 98% rename from .github/workflows/sync-to-gitee.yml rename to .github/workflows/sync-shzhxh.yml index d0c75af..bcf1d81 100644 --- a/.github/workflows/sync-to-gitee.yml +++ b/.github/workflows/sync-shzhxh.yml @@ -1,4 +1,4 @@ -name: Sync Github Repos To Gitlink +name: Sync shzhxh on: push: