diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 2932c60b1..bc7dca628 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -11,8 +11,9 @@ concurrency: jobs: mirror: strategy: + fail-fast: false matrix: - target: + include: - name: Gitee repo: gitee.com/huanghongxun/HMCL user: 'hmcl-sync' @@ -21,12 +22,12 @@ jobs: repo: cnb.cool/HMCL-dev/HMCL user: 'cnb' token: 'CNB_SYNC_TOKEN' - name: Mirror to ${{ matrix.target.name }} + name: Mirror to ${{ matrix.name }} if: ${{ github.repository == 'HMCL-dev/HMCL' }} runs-on: ubuntu-latest steps: - - name: Mirror GitHub to ${{ matrix.target.name }} + - name: Mirror GitHub to ${{ matrix.name }} run: | - git clone --mirror "https://github.com/$GITHUB_REPOSITORY.git" -- repo + git clone --mirror "https://github.com/${{ github.repository }}.git" -- repo cd repo - git push -f --prune "https://${{ matrix.target.user }}:${{ secrets[matrix.target.token] }}@${{ matrix.target.repo }}.git" "refs/heads/*:refs/heads/*" "refs/tags/*:refs/tags/*" + git push -f --prune "https://${{ matrix.user }}:${{ secrets[matrix.token] }}@${{ matrix.repo }}.git" "refs/heads/*:refs/heads/*" "refs/tags/*:refs/tags/*"