Skip to content

Commit 6fabb8d

Browse files
authored
Create git-sync.yml (#81)
1 parent 4d679d8 commit 6fabb8d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/git-sync.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: GIT SYNC
2+
3+
on: [ push, delete ]
4+
5+
jobs:
6+
build:
7+
if: github.repository == 'erda-project/erda-java-extensions'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: unshallow
12+
run: git fetch --unshallow origin
13+
- name: add remote
14+
run: git remote add mirror https://${{ secrets.ERDA_CLOUD_MIRROR_GIT_USERNAME }}:${{ secrets.ERDA_CLOUD_MIRROR_GIT_PASSWORD }}@erda.cloud/erda/dop/erda-project/erda-java-extensions-mirror
15+
- name: push
16+
run: git push --tags --force --prune mirror "refs/remotes/origin/*:refs/heads/*"

0 commit comments

Comments
 (0)