Skip to content

Commit 5ce5a49

Browse files
committed
Add GitHub workflow to mirror repository to GitLab
This workflow automatically syncs all branches and tags to our GitLab repository whenever changes are pushed to GitHub.
1 parent 0e1b35a commit 5ce5a49

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Mirror to another repo
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # any branch
7+
8+
jobs:
9+
mirror:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# 1. Pull down your source (full history)
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
# 2. Add the target repository
18+
- name: Add target remote
19+
run: |
20+
git remote add target "https://${{ secrets.GITLAB_ACCESS_TOKEN }}@gitlab.com/malus-security/dyldextractor.git"
21+
22+
# 3. Push branches and tags (without remote tracking refs)
23+
- name: Push to target
24+
run: |
25+
# Push all local branches with force
26+
git push --force target "refs/heads/*:refs/heads/*"
27+
28+
# Push all tags
29+
git push --force target "refs/tags/*:refs/tags/*"

0 commit comments

Comments
 (0)