Skip to content

Commit

Permalink
Create gitlab-sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
z0z0r4 authored Oct 2, 2024
1 parent 858eda6 commit c719c03
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/gitlab-sync.yml
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"

0 comments on commit c719c03

Please sign in to comment.