-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1002 Bytes
/
mirror.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Sync to gitlab.eduxiji.net
# based on https://github.com/neuq-rcore/rCore/blob/vf2/.github/workflows/mirror.yml
on:
push:
branches:
- "**"
jobs:
sync:
runs-on: ubuntu-latest
env:
SITE: gitlab.eduxiji.net
USER_NAME: T202410145994247
REPO_NAME: OSKernel2024-MikuOS
REMOTE_NAME: gitlab-xiji
steps:
# fetch all history
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# setup env
- name: Setup git
run: |
git config --global user.name "Shetty Yttehs"
git config --global user.email "[email protected]"
# git push
- name: Push all
run: |
git remote add ${{ env.REMOTE_NAME }} https://${{ env.USER_NAME }}:${{ secrets.GITLAB_XIJI_TOKEN }}@${{ env.SITE }}/${{ env.USER_NAME }}/${{ env.REPO_NAME }}.git
git push -f --all ${{ env.REMOTE_NAME }}
git push -f --tags ${{ env.REMOTE_NAME }}