File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : GitLab Mirroring
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - development
8+ schedule :
9+ - cron : ' 0 0 * * 0'
10+
11+ jobs :
12+ mirror_to_gitlab :
13+ name : " Mirror to GitLab"
14+ runs-on : ubuntu-24.04
15+
16+ steps :
17+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Add SSH key
22+ env :
23+ SSH_AUTH_SOCK : /tmp/ssh_agent.sock
24+ run : |
25+ mkdir -p /home/runner/.ssh
26+ ssh-keyscan gitlab.com >> /home/runner/.ssh/known_hosts
27+ echo "${{ secrets.MIRROR_SSH_PRIVATE_KEY }}" > /home/runner/.ssh/github_actions
28+ chmod 600 /home/runner/.ssh/github_actions
29+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
30+ ssh-add /home/runner/.ssh/github_actions
31+
32+ - name : " Setup GitLab Remote"
33+ run : |
34+ git remote add gitlab git@gitlab.com:asdfdotdev/fail2slack.git
35+
36+ - name : " Push Mirrored Changes"
37+ run : |
38+ git push --tags --force --prune gitlab main development
You can’t perform that action at this time.
0 commit comments