diff --git a/.github/workflows/backup.yml b/.github/workflows/backup.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3f77cd8d65bf989325c99f9834579f2b08a8866 --- /dev/null +++ b/.github/workflows/backup.yml @@ -0,0 +1,22 @@ +name: Backup Git repository + +on: + push: + branches: + - master + +jobs: + git-repo-backup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Backup to Gitee + uses: jenkins-zh/git-backup-actions@v0.0.4 + env: + GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} + TARGET_GIT: "git@gitee.com:jenkins-zh/jenkins-zh.git" + - name: Backup to CodeChina + uses: jenkins-zh/git-backup-actions@v0.0.4 + env: + GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} + TARGET_GIT: "git@codechina.csdn.net:jenkins-zh/jenkins-zh.git"