1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-05 18:40:59 +00:00

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.
This commit is contained in:
Earl Warren 2025-08-18 13:22:15 +02:00
parent 2286f71dd5
commit 54130f2380
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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