diff --git a/.forgejo/workflows/cascade-forgejo.yml b/.forgejo/workflows/cascade-forgejo.yml index 5c61c5b8..d69a3c8c 100644 --- a/.forgejo/workflows/cascade-forgejo.yml +++ b/.forgejo/workflows/cascade-forgejo.yml @@ -47,6 +47,9 @@ jobs: ${{ toJSON(forge.event.pull_request.labels.*.name) }} EOF cat <<'EOF' + push => ${{ forge.event_name == 'push' && ( forge.ref_name == 'main' || forge.ref_name == 'wip-cascade') }} + pull_request_target synchornized => ${{ ( forge.event.action == 'synchronized' && contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') ) }} + pull_request_target label_updated => ${{ ( forge.event.action == 'label_updated' && forge.event.label == 'run-forgejo-tests' ) }} contains => ${{ contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') }} contains boolean => ${{ contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') == true }} EOF @@ -58,7 +61,7 @@ jobs: # # 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 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: > @@ -67,8 +70,8 @@ jobs: 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' ) + ( forge.event.action == 'synchronized' && contains(forge.event.pull_request.labels.*.name, 'run-forgejo-tests') ) || + ( forge.event.action == 'label_updated' && forge.event.label == 'run-forgejo-tests' ) ) ) )