Skip to content

Commit a5bae8a

Browse files
committed
update sync script.
1 parent 0289b30 commit a5bae8a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/gitee-sync-shell.sh

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ git config --global user.name "sync2gitee"
55
pwd
66
git remote -v
77

8+
GITHUB_REF=$1
9+
ACTION_BRANCH=$(echo ${GITHUB_REF#refs/heads})
10+
echo ACTION_BRANCH=$ACTION_BRANCH
11+
12+
git checkout $ACTION_BRANCH
13+
814
# change android maven to china repos
915
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle
1016
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties

.github/workflows/gitee-sync.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.actor != 'dependabot[bot]'
1515
steps:
1616
- name: Gitee sync repo
17-
uses: xgfd3/hub-mirror-action@v1.0
17+
uses: xgfd3/hub-mirror-action@v1.1
1818
with:
1919
src: github/AgoraIO
2020
dst: gitee/agoraio-community
@@ -25,4 +25,5 @@ jobs:
2525
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
2626
force_update: true
2727
account_type: org
28-
shell_path: ./.github/workflows/gitee-sync-shell.sh
28+
shell_path: ./.github/workflows/gitee-sync-shell.sh
29+
shell_arg: ${{ github.ref }}

0 commit comments

Comments
 (0)