From b8d122740cc87f05a84dfc052ee847622fd46ebf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 Jan 2026 17:43:13 +0100 Subject: [PATCH] keepalive: avoid diverging commits in forks In forks of `gitgitgadget-workflows`, we want to prefer merging the upstream branch over generating keepalive commits that diverge from upstream. To that end, run the workflow every week, and ensure that there is a commit at least every 4 weeks in forks, but every 3 weeks in the upstream repository. That way, the forks should always pick up the upstream's keepalive commit. Signed-off-by: Johannes Schindelin --- .github/workflows/keepalive.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index 1c7ac50..07eeffd 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -2,7 +2,7 @@ name: Keep scheduled workflows alive on: schedule: - - cron: "23 19 3,17 * *" # 7:23pm on every 3rd and 17th of the month + - cron: "23 19 * * 0" # 7:23pm on every Sunday workflow_dispatch: env: @@ -34,7 +34,7 @@ jobs: if: steps.merge.outputs.result != 'merged' run: | if test workflow_dispatch != '${{ github.event_name }}' && - test 0 -lt $(git rev-list --count --since=3.weeks.ago HEAD) + test 0 -lt $(git rev-list --count --since=${{ github.event.repository.fork == true && '4' || '3' }}.weeks.ago HEAD) then echo "::notice::No need to keep alive, there were commits in the last three weeks" echo "result=skip-push" >>$GITHUB_OUTPUT