Add scrip to mirror repo to gitee

This commit is contained in:
Xiaonan Shen 2020-11-22 01:25:47 -08:00
parent 3463966b94
commit 139a97b58f
No known key found for this signature in database
GPG Key ID: 211BF560D12417F5

27
.github/workflows/mirror.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Mirroring
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
- dev
jobs:
mirror_gitee:
name: Mirror to Gitee
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Push to Gitee
env:
SSH_KEY: ${{ secrets.GITEE_KEY }}
run: |
mkdir -p ~/.ssh
echo "${SSH_KEY}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
export GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -l git"
git remote add gitee git@gitee.com:shenxn/protonmail-bridge-docker.git
git push --tags --force --prune gitee "refs/remotes/origin/*:refs/heads/*"