From 54130f2380bd55a8b66303fa5268d07eaf8f0a04 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 18 Aug 2025 13:22:15 +0200 Subject: [PATCH] chore: cascade forgejo pull request out of the runner branch or PR (followup) Also run when the `run-forgejo-tests` is set so that it is not necessary to push a commit to the pull request in addition. --- .forgejo/workflows/cascade-forgejo.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/cascade-forgejo.yml b/.forgejo/workflows/cascade-forgejo.yml index 7a9a48c0..5c61c5b8 100644 --- a/.forgejo/workflows/cascade-forgejo.yml +++ b/.forgejo/workflows/cascade-forgejo.yml @@ -55,10 +55,22 @@ jobs: EOF forgejo: + # + # Always run when a commit is pushed to the main or wip-cascade branch + # 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 + # if: > vars.ROLE == 'forgejo-coding' && ( - ( forge.event_name == 'push' && ( forge.ref_name == 'main' || forge.ref_name == 'wip-cascade') ) || - ( forge.event_name == 'pull_request_target' && contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') ) + ( + forge.event_name == 'push' && ( forge.ref_name == 'main' || forge.ref_name == 'wip-cascade') + ) || ( + forge.event_name == 'pull_request_target' && ( + ( github.event.action == 'synchronized' && contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') ) || + ( github.event.action == 'label_updated' && github.event.label == 'run-forgejo-tests' ) + ) + ) ) runs-on: docker