Skip to content

Commit 828cffa

Browse files
feat: main 브랜치 sync fork 워크플로우 생성 (#123)
1 parent 50cb7ea commit 828cffa

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Synchronize main to forked repo
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
sync:
9+
if: github.repository == 'kitworks-kiring/kiring-frontend'
10+
name: Sync forked repo
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout main
15+
uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.KIRING_DEV_GITHUB_TOKEN }}
18+
fetch-depth: 0
19+
ref: main
20+
21+
- name: Add remote-url
22+
run: |
23+
git remote add forked-repo https://kiring-dev:${{ secrets.KIRING_DEV_GITHUB_TOKEN }}@github.com/kiring-dev/kiring-frontend
24+
git config user.name kiring-dev
25+
git config user.email kiring.dev@gmail.com
26+
27+
- name: Push changes to forked-repo
28+
run: |
29+
git push -f forked-repo main
30+
31+
- name: Clean up
32+
run: |
33+
git remote remove forked-repo

0 commit comments

Comments
 (0)