-
Notifications
You must be signed in to change notification settings - Fork 4
27 lines (25 loc) · 1.37 KB
/
mirror.yml
File metadata and controls
27 lines (25 loc) · 1.37 KB
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
name: mirrorgit
on:
#push:
#branches: [master]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.DEPLOYMENT_ENVIRONMENT }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: mirror to git
run: |
sudo apt update && sudo apt install git git-lfs python3-full python3-pip -y && sudo sh -c "echo StrictHostKeyChecking no >> /etc/ssh/ssh_config"
sudo mkdir -p /root/.ssh
sudo sh -c "echo '${{ secrets.GITEE_KEY }}' > /root/.ssh/id_rsa"
#sudo sh -c "echo '${{ secrets.GITEA_KEY }}' > /root/.ssh/id_rsa"
sudo chmod 600 /root/.ssh/id_rsa
sudo apt remove python3-urllib3 python3-idna python3-chardet
sudo pip3 install -r .github/hubmirror/requirements.txt
sudo git lfs install
sudo python3 .github/hubmirror/hubmirror.py --src "github/minlearn" --dst "gitee/minlearn" --dst-key "${{ secrets.GITEE_KEY }}" --dst-token "${{ secrets.GITEE_TOKEN }}" --static-list "minlearnprogramming" --account-type "org" --force-update "true"
#sudo python3 .github/hubmirror/hubmirror.py --src "github/minlearn" --dst "gitea/minlearn" --gitea-url http://minlearnprogramming.xxx/gitea --dst-key "${{ secrets.GITEA_KEY }}" --dst-token "${{ secrets.GITEA_TOKEN }}" --static-list "minlearnprogramming" --force-update "true"