From 1462d5343189e09694bd9e9c8a21723340f3a236 Mon Sep 17 00:00:00 2001 From: marksverdhei Date: Wed, 20 Aug 2025 10:05:22 +0200 Subject: [PATCH] add auto sync workflow --- .github/workflows/sync.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..4626a35 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,35 @@ +name: Sync fork with upstream + +on: + schedule: + - cron: "15 3 * * *" # runs daily at 03:15 UTC + workflow_dispatch: {} # allow manual run + +permissions: + contents: write + +env: + UPSTREAM: deepbeepmeep/Wan2GP + UPSTREAM_BRANCH: main + TARGET_BRANCH: main + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout fork + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Add upstream remote + run: | + git remote add upstream https://github.com/${UPSTREAM}.git + git fetch upstream ${UPSTREAM_BRANCH} + + - name: Fast-forward fork + run: | + git checkout ${TARGET_BRANCH} + # Try a strict fast-forward; fail if conflicts or diverged history. + git merge --ff-only upstream/${UPSTREAM_BRANCH} + git push origin ${TARGET_BRANCH} diff --git a/.gitignore b/.gitignore index b42c7cd..79e0bba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.* +# .* *.py[cod] # *.jpg *.jpeg