Sync Fork with Upstream #4
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: | |
# Runs daily at midnight UTC | |
- cron: '0 0 * * *' | |
# Optional: Allow manual triggering from the GitHub UI | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Allows pushing changes | |
steps: | |
- name: Checkout Fork | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for proper merging | |
- name: Add Upstream Remote | |
run: | | |
git remote add upstream https://github.com/JuliaLang/julia | |
- name: Fetch Upstream Changes | |
run: git fetch upstream | |
- name: Merge Changes into Local Branch | |
run: | | |
git checkout master # Replace with your branch name if different | |
git merge upstream/master | |
- name: Push Changes to Fork | |
run: git push origin master |