Skip to content

Commit 01456c9

Browse files
authored
Add mirroring for internal repository (#10)
Signed-off-by: Khor Shu Heng <khor.heng@go-jek.com>
1 parent 82e08f8 commit 01456c9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/mirror.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: mirror
2+
3+
on:
4+
push:
5+
branches: master
6+
tags:
7+
- 'v*.*.*'
8+
9+
jobs:
10+
mirror:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: webfactory/ssh-agent@v0.4.1
17+
with:
18+
ssh-private-key: ${{ secrets.MIRROR_SSH_KEY }}
19+
- name: Mirror all origin branches and tags to internal repo
20+
run: |
21+
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
22+
git remote add internal ${{ secrets.INTERNAL_REPO }}
23+
git push internal --all -f
24+
git push internal --tags -f

0 commit comments

Comments
 (0)