Skip to content

Commit 580b58a

Browse files
committed
keepalive: force commit when triggered manually
When issuing a workflow dispatch, the intention is to keep the repository alive, i.e. a commit _must_ be made, one way or another. Let's side-step the 3-weeks logic in that scenario. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2e14988 commit 580b58a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/keepalive.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
id: commit
3434
if: steps.merge.outputs.result != 'merged'
3535
run: |
36-
if test 0 -lt $(git rev-list --count --since=3.weeks.ago HEAD)
36+
if test workflow_dispatch != '${{ github.event_name }}' &&
37+
test 0 -lt $(git rev-list --count --since=3.weeks.ago HEAD)
3738
then
3839
echo "::notice::No need to keep alive, there were commits in the last three weeks"
3940
echo "result=skip-push" >>$GITHUB_OUTPUT

0 commit comments

Comments
 (0)