-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) ยท 1022 Bytes
/
main.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
name: sync gitlab
on:
push:
branches:
- main
- AND_develop
- BE_develop
- FE_develop
jobs:
push-to-gitlab:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "์ ์๋ฏผ"
git config user.email "[email protected]"
- name: Push to GitLab
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
git checkout ${{ github.ref_name }}
git pull origin ${{ github.ref_name }}
git checkout -b temp
git filter-branch --force --prune-empty --index-filter "git rm -rf --cached --ignore-unmatch .github" HEAD
git remote add gitlab https://oauth2:[email protected]/s10-final/S10P31D107.git
git push gitlab temp:${{ github.ref_name }} --force
git checkout ${{ github.ref_name }}
git branch -D temp