Skip to content

Commit f974f12

Browse files
committed
Add Gitlab autopush
1 parent 079a809 commit f974f12

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/autopush.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Gitlab mirror
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
autopush:
9+
name: Automatic push to gitlab.tiker.net
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- run: |
14+
mkdir ~/.ssh && echo -e "Host gitlab.tiker.net\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
15+
eval $(ssh-agent) && echo "$GITLAB_AUTOPUSH_KEY" | ssh-add -
16+
git fetch --unshallow
17+
git push "git@gitlab.tiker.net:inducer/$(basename $GITHUB_REPOSITORY).git" main
18+
env:
19+
GITLAB_AUTOPUSH_KEY: ${{ secrets.GITLAB_AUTOPUSH_KEY }}
20+
21+
# vim: sw=4

0 commit comments

Comments
 (0)