Skip to content

Commit 165f654

Browse files
authored
Create a GitHub actioin to backup code repo (#13)
1 parent 27d730b commit 165f654

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/backup.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Backup Git repository
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
git-repo-backup:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Backup to Gitee
14+
uses: jenkins-zh/git-backup-actions@v0.0.4
15+
env:
16+
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
17+
TARGET_GIT: "git@gitee.com:devops-ws/learn-pipeline-java.git"
18+
- name: Backup to CodeChina
19+
uses: jenkins-zh/git-backup-actions@v0.0.4
20+
env:
21+
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
22+
TARGET_GIT: "git@codechina.csdn.net:devops-ws/learn-pipeline-java.git"

0 commit comments

Comments
 (0)