-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 通过 Github action, 在仓库的每一次 commit 后自动同步到 Gitee 上 | ||
name: sync2gitlab | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
repo-sync: | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITLAB_PRIVATE_KEY }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Configure Git | ||
run: | | ||
git config --global --add safe.directory /github/workspace | ||
- name: sync github -> gitee | ||
uses: wearerequired/git-mirror-action@master | ||
if: env.SSH_PRIVATE_KEY | ||
with: | ||
source-repo: "[email protected]:${{ github.repository }}.git" | ||
destination-repo: "[email protected]:z0z0r4/mcim.git" |