diff --git a/.forgejo/workflows/cascade-forgejo.yml b/.forgejo/workflows/cascade-forgejo.yml index 1f371dfd..15063e7a 100644 --- a/.forgejo/workflows/cascade-forgejo.yml +++ b/.forgejo/workflows/cascade-forgejo.yml @@ -30,6 +30,7 @@ on: types: - synchronize - labeled + - closed enable-email-notifications: true @@ -63,6 +64,7 @@ jobs: # If this is a pull request, run # - when the `run-forgejo-tests` label is set (label_updated) (but not if another label is set or if a label is removed) # - when a new commit is pushed to the pull request (synchronized) if the `run-forgejo-tests` is already present + # - when the pull request is closed, which also happens when it is merged, so that the Forgejo pull request is closed # if: > vars.ROLE == 'forgejo-coding' && ( @@ -70,6 +72,7 @@ jobs: forge.event_name == 'push' && ( forge.ref_name == 'main' || forge.ref_name == 'wip-cascade') ) || ( forge.event_name == 'pull_request_target' && ( + forge.event.action == 'closed' || ( forge.event.action == 'synchronized' && contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') ) || ( forge.event.action == 'label_updated' && forge.event.label.name == 'run-forgejo-tests' ) )