Skip to content

Commit b83b525

Browse files
Update .github/workflows/push-to-ms.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 171ed17 commit b83b525

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/push-to-ms.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ jobs:
3838
MS_REPO_TYPE: models
3939
MS_REPO_ID: chenzihong/GraphGen
4040
run: |
41-
git config --global credential.helper store
42-
echo "https://oauth2:${MS_TOKEN}@www.modelscope.cn" > ~/.git-credentials
43-
41+
# Use token in the clone URL, do not write credentials to disk
4442
[[ -d ms-repo ]] && rm -rf ms-repo
45-
git clone https://www.modelscope.cn/${MS_REPO_TYPE}/${MS_REPO_ID}.git ms-repo
43+
git clone https://oauth2:${MS_TOKEN}@www.modelscope.cn/${MS_REPO_TYPE}/${MS_REPO_ID}.git ms-repo
4644
4745
rsync -a --delete --exclude='.git' --exclude='ms-repo' ./ ms-repo/
4846
4947
cd ms-repo
5048
git add .
5149
git diff-index --quiet HEAD || \
52-
(git commit -m "Auto-sync from ${{ inputs.ref }} at $(date -u)" && git push)
50+
(git commit -m "Auto-sync from ${{ inputs.ref }} at $(date -u)" && \
51+
git push "https://oauth2:${MS_TOKEN}@www.modelscope.cn/${MS_REPO_TYPE}/${MS_REPO_ID}.git")

0 commit comments

Comments
 (0)