Skip to content

Commit

Permalink
Fix: sync-form yaml final (#3) (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: minchodang <[email protected]>
  • Loading branch information
minchodang and minchodang authored Aug 9, 2024
1 parent 62d358c commit bc116ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/sync_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Sync Upstream and Create PR

on:
schedule:
- cron: '0 18 * * *' # 매일 18시에 실행
- cron: '*/1 * * * *' # 매 분마다 실행
workflow_dispatch: # 수동으로도 실행 가능하게 설정

jobs:
Expand Down Expand Up @@ -49,11 +49,17 @@ jobs:
run: |
cd fork
git fetch upstream main
git diff --exit-code upstream/main || echo "changes=true" >> $GITHUB_OUTPUT
git diff --exit-code upstream/main -- . ':(exclude).github/workflows/sync-upstream.yml' || echo "changes=true" >> $GITHUB_OUTPUT
if [ ! -f $GITHUB_OUTPUT ]; then
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Pull latest changes from forked-repo
if: steps.changes.outputs.changes == 'true'
run: |
cd fork
git pull origin main --rebase
- name: Push changes to forked-repo
if: steps.changes.outputs.changes == 'true'
run: |
Expand Down

0 comments on commit bc116ba

Please sign in to comment.