Skip to content

Sync Fork with Upstream #8801

Sync Fork with Upstream

Sync Fork with Upstream #8801

Workflow file for this run

name: Sync Fork with Upstream
on:
schedule:
# Run every 5 minutes
- cron: '*/5 * * * *'
# Allow manual triggering
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
name: Sync Fork with Upstream
# Only run on forks, not on the original repository
if: github.repository != 'Schroedinger-Hat/schroedinger-hat-website'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add upstream remote
run: |
git remote add upstream https://github.com/Schroedinger-Hat/schroedinger-hat-website.git
git fetch upstream
- name: Sync fork with upstream main branch
run: |
git checkout main
git merge upstream/main
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}