From ca7ae3c2410c68b5ebeb0f7f701774f9729f9249 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Thu, 25 May 2023 01:15:04 +0100 Subject: [PATCH] .github/workflows/preview.yml: Fix YAML syntax --- .github/workflows/preview.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 130def5bb..75e6b5aee 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -1,15 +1,15 @@ name: preview on: - # Run the workflow when any branch is updated, since we can't seem to filter - # on the preview branches and main only. - - push: null - # Whenever a pull request is labeled or unlabeled. - - pull_request: null + pull_request: null # To be able to manually trigger the job from GitHub UI - workflow_dispatch: null + workflow_dispatch: + + # Run the workflow when any branch is updated, since we can't seem to filter + # on the preview branches and main only. + push: null permissions: # Necessary to be able to push to the repo @@ -22,7 +22,7 @@ jobs: # https://github.com/actions/virtual-environments runs-on: ubuntu-latest - if: ${{ github.event.label.name == 'preview' || (github.event.action == 'push' && contains(github.event.pull_request.labels.*.name, 'preview')) || github.event.inputs }} + if: ${{ github.event.label.name == 'preview' || (github.event.action == 'push' && (contains(github.event.pull_request.labels.*.name, 'preview') || github.ref == 'refs/heads/main' )) || github.event.inputs }} steps: -- GitLab