-
Notifications
You must be signed in to change notification settings - Fork 2
29 lines (24 loc) · 792 Bytes
/
Copy pathmirror.yml
File metadata and controls
29 lines (24 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: sync-mirror
on: [push, delete, create]
concurrency:
group: sync-mirror
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
- name: Mirror gitee repository
uses: wearerequired/git-mirror-action@v1
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
source-repo: "git@github.com:ChiahsinChu/WatAnalysis.git"
destination-repo: "git@gitee.com:chiahsinchu/WatAnalysis.git"