Sync Fork with Upstream #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Fork with Upstream | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Schedule the workflow to run daily, you can customize the schedule | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Configure upstream remote | |
run: | | |
git remote add upstream https://github.com/nhost/cli.git | |
git fetch upstream | |
- name: Merge upstream changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Sync Fork" | |
git checkout main | |
git merge --allow-unrelated-histories -X theirs upstream/main -m "Merge upstream changes" | |
git push origin main |