diff --git a/.github/workflows/gitee-sync-shell.sh b/.github/workflows/gitee-sync-shell.sh index 61700cd43..bccde2d90 100755 --- a/.github/workflows/gitee-sync-shell.sh +++ b/.github/workflows/gitee-sync-shell.sh @@ -5,6 +5,12 @@ git config --global user.name "sync2gitee" pwd git remote -v +GITHUB_REF=$1 +ACTION_BRANCH=$(echo ${GITHUB_REF#refs/heads}) +echo ACTION_BRANCH=$ACTION_BRANCH + +git checkout $ACTION_BRANCH + # change android maven to china repos sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties diff --git a/.github/workflows/gitee-sync.yml b/.github/workflows/gitee-sync.yml index 02c9462fe..048af255c 100644 --- a/.github/workflows/gitee-sync.yml +++ b/.github/workflows/gitee-sync.yml @@ -14,7 +14,7 @@ jobs: if: github.actor != 'dependabot[bot]' steps: - name: Gitee sync repo - uses: xgfd3/hub-mirror-action@v1.0 + uses: xgfd3/hub-mirror-action@v1.1 with: src: github/AgoraIO dst: gitee/agoraio-community @@ -25,4 +25,5 @@ jobs: dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }} force_update: true account_type: org - shell_path: ./.github/workflows/gitee-sync-shell.sh \ No newline at end of file + shell_path: ./.github/workflows/gitee-sync-shell.sh + shell_arg: ${{ github.ref }} \ No newline at end of file