Sync Fork #9
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 | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs daily at midnight (UTC) | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
sync: | |
if: ${{ github.repository != 'Form-pilot/TailorMade' }} # Run only if this is not the upstream repo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Fork | |
uses: actions/checkout@v3 | |
- name: Add Upstream Repository | |
run: | | |
git remote add upstream https://github.com/Form-pilot/TailorMade.git | |
git fetch upstream | |
- name: Sync Changes | |
run: | | |
git checkout main | |
git merge upstream/main --allow-unrelated-histories | |
git push origin main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |