Skip to content

Commit

Permalink
更新 .github/workflows/sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
YaKun9 committed Jun 22, 2024
1 parent adf14dd commit bedf0ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync from Gitea repository
name: 从上游Gitea仓库同步更新

on:
schedule:
Expand All @@ -25,12 +25,13 @@ jobs:
GITEA_USERNAME: ${{ secrets.GITEA_USERNAME }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
git clone --mirror https://${GITEA_USERNAME}:${GITEA_TOKEN}@${GITEA_URL} gitea_repo
git clone --bare https://${GITEA_USERNAME}:${GITEA_TOKEN}@${GITEA_URL} gitea_repo
- name: Sync changes to GitHub
env:
GITHUB_ACTOR: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
cd gitea_repo
git remote set-url --push origin https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/YaKun9/SageTools.git
git push --mirror
git fetch --all
git push --force --all

0 comments on commit bedf0ae

Please sign in to comment.