Skip to content

Commit 2ace970

Browse files
committed
mirror workflow
1 parent 9570dc5 commit 2ace970

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/mirror.yml

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

0 commit comments

Comments
 (0)