Skip to content

Commit

Permalink
Create sync-with-upstream.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
keinn51 authored May 25, 2024
1 parent dbae5ca commit acb944e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/sync-with-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Sync with Upstream

on:
schedule:
- cron: '25 0 * * *' # 매일 자정(UTC 기준)에 실행
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout forked repository
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Configure git
run: |
git config --global user.name 'keinn51'
git config --global user.email '[email protected]'
- name: Add remote upstream
run: git remote add upstream https://github.com/42-seoul-projects-kyungsle/bundle-repo.git

- name: Fetch changes from upstream
run: git fetch upstream

- name: Merge changes from upstream/main to main
run: |
git checkout main
git merge upstream/main --allow-unrelated-histories
git push https://${{ secrets.GH_PAT }}@github.com/keinn51/bundle-repo-42-seoul-projects.git main

0 comments on commit acb944e

Please sign in to comment.