From f9fad99e685fb7836442a72df74b55626a347d8b Mon Sep 17 00:00:00 2001 From: lan-tianxiang <42911023+lan-tianxiang@users.noreply.github.com> Date: Fri, 26 Mar 2021 14:46:09 +0800 Subject: [PATCH] Update gitee.yml --- .github/workflows/gitee.yml | 50 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/gitee.yml b/.github/workflows/gitee.yml index 4b1558c..9d047a5 100644 --- a/.github/workflows/gitee.yml +++ b/.github/workflows/gitee.yml @@ -1,31 +1,29 @@ -name: sync to gitee +name: Gitee repos mirror periodic job on: +# 如果需要PR触发把push前的#去掉 +# push: schedule: - - cron: '1 0,15 * * *' - workflow_dispatch: - watch: - types: started - push: - branches: [ master ] - repository_dispatch: - types: sync-LXK9301-scripts + # 每天北京时间9点跑 + - cron: '0 1 * * *' jobs: - repo-sync: - env: - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} # 我自己同步到gitee使用,其他人可忽略 + build: runs-on: ubuntu-latest - if: github.event.repository.owner.id == github.event.sender.id steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: sync github -> gitee - uses: Yikun/hub-mirror-action@master - with: - src: github/lan-tianxiang - dst: gitee/highdimen - static_list: "clone_scripts" - dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} - dst_token: ${{ secrets.GITEE_TOKEN }} - clone_style: "ssh" + - name: Mirror the Github organization repos to Gitee. + uses: Yikun/gitee-mirror-action@master + with: + # 必选,需要同步的Github用户(源) + src: github/lan-tianxiang + # 必选,需要同步到的Gitee的用户(目的) + dst: gitee/highdimen + # 必选,Gitee公钥对应的私钥,https://gitee.com/profile/sshkeys + dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} + # 必选,Gitee对应的用于创建仓库的token,https://gitee.com/profile/personal_access_tokens + dst_token: ${{ secrets.GITEE_TOKEN }} + clone_style: "ssh" + # 如果是组织,指定组织即可,默认为用户user + # account_type: org + # 还有黑、白名单,静态名单机制,可以用于更新某些指定库 + static_list: "clone_scripts" + # black_list: 'repo_name,repo_name2' + # white_list: 'repo_name,repo_name2'