mirror.yml 中直接传递用户名 (#5005)
This commit is contained in:
6
.github/workflows/mirror.yml
vendored
6
.github/workflows/mirror.yml
vendored
@@ -12,11 +12,11 @@ jobs:
|
|||||||
target:
|
target:
|
||||||
- name: Gitee
|
- name: Gitee
|
||||||
repo: gitee.com/huanghongxun/HMCL
|
repo: gitee.com/huanghongxun/HMCL
|
||||||
user: 'GITEE_SYNC_USERNAME'
|
user: 'hmcl-sync'
|
||||||
token: 'GITEE_SYNC_TOKEN'
|
token: 'GITEE_SYNC_TOKEN'
|
||||||
- name: CNB
|
- name: CNB
|
||||||
repo: cnb.cool/HMCL-dev/HMCL
|
repo: cnb.cool/HMCL-dev/HMCL
|
||||||
user: 'CNB_SYNC_USERNAME'
|
user: 'cnb'
|
||||||
token: 'CNB_SYNC_TOKEN'
|
token: 'CNB_SYNC_TOKEN'
|
||||||
name: Mirror to ${{ matrix.target.name }}
|
name: Mirror to ${{ matrix.target.name }}
|
||||||
if: ${{ github.repository == 'HMCL-dev/HMCL' }}
|
if: ${{ github.repository == 'HMCL-dev/HMCL' }}
|
||||||
@@ -26,4 +26,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone --mirror "https://github.com/$GITHUB_REPOSITORY.git" -- repo
|
git clone --mirror "https://github.com/$GITHUB_REPOSITORY.git" -- repo
|
||||||
cd repo
|
cd repo
|
||||||
git push -f --prune "https://${{ secrets[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.target.user }}:${{ secrets[matrix.target.token] }}@${{ matrix.target.repo }}.git" "refs/heads/*:refs/heads/*" "refs/tags/*:refs/tags/*"
|
||||||
|
|||||||
Reference in New Issue
Block a user