From 3f3de71a38709f64db22f16c88ff3c026eca6aa3 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 22 Aug 2023 08:14:18 +0200 Subject: [PATCH] Fix #107: auto-sync forks every day 2:42 UTC or on dispatch Highly experimental. Signed-off-by: Joachim Wiberg --- .github/workflows/sync-fork.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sync-fork.yml diff --git a/.github/workflows/sync-fork.yml b/.github/workflows/sync-fork.yml new file mode 100644 index 00000000..3a78de77 --- /dev/null +++ b/.github/workflows/sync-fork.yml @@ -0,0 +1,26 @@ +# To enable automatic sync of your Infix fork every day, or on dispatch, +# set the repoistory or organisation variable (not secret): +# +# SYNC_FORK = 'true' +# +# See https://docs.github.com/en/actions/learn-github-actions/variables +name: Synchronize your fork of Infix with upstream + +on: + schedule: + - cron: 42 2 * * * + workflow_dispatch: + +jobs: + sync_fork: + if: ${{github.repository_owner != 'kernelkit' && vars.SYNC_FORK == 'true' }} + runs-on: ubuntu-latest + steps: + - uses: TobKed/github-forks-sync-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + upstream_repository: KernelKit/infix + upstream_branch: main + target_branch: main + force: true + tags: true