From 95af0e82e55bf0ce3ea5ec7358cd93f83ef25b03 Mon Sep 17 00:00:00 2001 From: sirineJ <112706079+sirineJ@users.noreply.github.com> Date: Mon, 23 Dec 2024 12:28:44 +0100 Subject: [PATCH] use label workaround --- .github/workflows/cr.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index 59f0fb4091..fcccdd4dc2 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -1,18 +1,16 @@ name: Continuous Releases on: - issue_comment: - types: [created] + pull_request: + types: [opened, synchronize] jobs: build: - if: ${{ github.event.comment.body == '/preview' && github.event.issue.pull_request }} + if: ${{ github.event.issue.pull_request && contains(github.event.pull_request.labels.*.name, 'preview') }} runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - with: - ref: refs/pull/${{ github.event.issue.number }}/head #based on https://github.com/stackblitz-labs/pkg.pr.new/issues/187 - name: Setup Node.js v20 uses: actions/setup-node@v4