From 90bb5ba1c9299037537381fa68e747def6b4b837 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 16 Dec 2023 16:53:13 +0800 Subject: [PATCH] try it --- .github/workflows/mirror.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 5d9406b..fa5ab1f 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -3,8 +3,7 @@ on: - cron: "0,20,40 * * * *" workflow_dispatch: -permissions: - contents: write +permissions: write-all jobs: pull_remote: @@ -13,6 +12,8 @@ jobs: steps: - name: just checkout uses: actions/checkout@v4 + with: + token: ${{ secrets.WORK_TOKEN }} - name: clone remote shell: bash @@ -21,14 +22,4 @@ jobs: git config --global user.name shenjack-action git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git git fetch gitea - for branch in $(git branch -r | grep 'gitea'); do - branchName=${branch#*/} - if ! git branch | grep -q $branchName; then - git branch --track $branchName $branch - fi - done - - - name: push to github - run: | - git pull --all - git push origin --all --force \ No newline at end of file + git push origin --mirror