From 139a97b58fdd9f9a7ba32f2a1ac21a5e55f8e2aa Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Sun, 22 Nov 2020 01:25:47 -0800 Subject: [PATCH] Add scrip to mirror repo to gitee --- .github/workflows/mirror.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/mirror.yaml 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/*"