File tree Expand file tree Collapse file tree 2 files changed +38
-32
lines changed
Expand file tree Collapse file tree 2 files changed +38
-32
lines changed Original file line number Diff line number Diff line change 1+ name : Synchronize to forked repo
2+
3+ on :
4+ push :
5+ branches :
6+ - main # main 브랜치에 push 발생 시 실행
7+ - develop # develop 브랜치에 push 발생 시 실행
8+
9+ jobs :
10+ sync :
11+ name : Sync forked repo
12+ runs-on : ubuntu-latest # GitHub Actions 가상 환경
13+
14+ steps :
15+ - name : Checkout current branch
16+ uses : actions/checkout@v4
17+ with :
18+ token : ${{ secrets.AUTO_ACTIONS }}
19+ fetch-depth : 0
20+
21+ - name : Determine target branch
22+ id : vars
23+ run : |
24+ BRANCH=$(basename "${{ github.ref }}")
25+ echo "TARGET_BRANCH=$BRANCH" >> $GITHUB_ENV
26+
27+ - name : Add remote-url
28+ run : |
29+ git remote add forked-repo https://dewbeeny:${{ secrets.AUTO_ACTIONS }}@github.com/dewbeeny/HomePage-FE
30+ git config user.name dewbeeny
31+ git config user.email ${{ secrets.EMAIL }}
32+
33+ - name : Push changes to forked-repo
34+ run : |
35+ git push -f forked-repo ${{ env.TARGET_BRANCH }}
36+ - name : Clean up
37+ run : |
38+ git remote remove forked-repo
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments