Skip to content

Commit

Permalink
chore: 깃액션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry-Cha authored Apr 24, 2024
1 parent 915848d commit ad5e27c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: sync gitlab

on:
push:
branches:
- main
- AND_develop
- BE_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

0 comments on commit ad5e27c

Please sign in to comment.