diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml new file mode 100644 index 0000000..4e2409b --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -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/*"