From 1608716ce6940524053810e45bad15232afc7c8b Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Thu, 25 May 2023 02:02:12 +0100 Subject: [PATCH] .github/workflows/preview.yml: Fixup condition --- .github/workflows/preview.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 31ee0e8be..dc756884a 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -24,7 +24,26 @@ jobs: # https://github.com/actions/virtual-environments runs-on: ubuntu-latest - if: ${{ (github.event_name == 'pull_request' && (github.event_type == 'synchronize' || ((github.event_type == 'labeled' || github.event_type == 'unlabeled') && github.event.label.name == 'preview'))) || github.event_name != 'pull_request' }} + if: | + ${{ + ( + github.event_name == 'pull_request' && + ( + ( + github.event.action == 'synchronize' && + contains(github.event.pull_request.labels.*.name, 'preview') + ) || + ( + ( + github.event.action == 'labeled' || + github.event.action == 'unlabeled' + ) && + github.event.label.name == 'preview' + ) + ) + ) || + github.event_name != 'pull_request' + }} steps: -- GitLab