diff --git a/.github/cached/keepalive.txt b/.github/cached/keepalive.txt deleted file mode 100644 index 131619b..0000000 --- a/.github/cached/keepalive.txt +++ /dev/null @@ -1 +0,0 @@ -Wed Jun 17 21:25:29 UTC 2026 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index d8de889..037512f 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -25,28 +25,12 @@ jobs: git fetch https://github.com/gitgitgadget/gitgitgadget-workflows HEAD && if test 0 = $(git rev-list --count HEAD..FETCH_HEAD) then - exit 0 # let the next step create a commit + exit 0 # nothing to merge fi && git merge --no-edit FETCH_HEAD && echo "result=merged" >>$GITHUB_OUTPUT - - name: Create a commit - id: commit - 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) - then - echo "::notice::No need to keep alive, there were commits in the last three weeks" - echo "result=skip-push" >>$GITHUB_OUTPUT - exit 0 - fi && - mkdir -p .github/cached - file='.github/cached/keepalive.txt' - date >$file - git add "$file" - git commit -m "workflow keepalive" - name: Push changes - if: steps.commit.outputs.result != 'skip-push' + if: steps.merge.outputs.result == 'merged' run: | git push origin HEAD &2 + ret=1 + } + done + exit $ret