Skip to content

Commit 055c68b

Browse files
refactor: git-push.yml 로직 개선
1 parent 6712f5c commit 055c68b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/git-push.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ jobs:
1818

1919
- name: Configure git
2020
run: |
21-
git config --global user.name "GitHub Action"
22-
git config --global user.email "[email protected]"
21+
git remote add forked-repo https://${{ secrets.JIWON_GITHUB_KEY }}@github.com/Choi-Jiwon-38/workinkorea.git
22+
git config user.name "Choi-Jiwon-38"
23+
git config user.email "[email protected]"
2324
24-
- name: Add fork as remote
25+
- name: Push changes to forked-repo
2526
run: |
26-
git remote add fork https://${{secrets.JIWON_GITHUB_KEY}}@github.com/Choi-Jiwon-38/workinkorea.git
27-
git fetch fork
28-
git checkout develop
27+
git push -f forked-repo develop
2928
30-
- name: Push to forked repo
29+
- name: Clean up
3130
run: |
32-
git push fork develop --force-with-lease
31+
git remote remove forked-repo

0 commit comments

Comments
 (0)