From 33e2a9dc869f512c495a8d28fc40844f16c42dd0 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 20 Dec 2023 10:48:57 +0530 Subject: [PATCH] fix(ci): allow pull_request workflow to run in merge queues --- .github/workflows/pull_request.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7931c3ac1f..89bf1ac632 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,7 +5,7 @@ on: name: Check pull request concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref || github.ref_name }} cancel-in-progress: true env: @@ -19,6 +19,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Check if relevant files have changed + if: ${{ github.head_ref != '' }} uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 id: service-changed with: @@ -28,7 +29,7 @@ jobs: return await script({github, context}) - name: Fail if no files changed - if: "${{ steps.service-changed.outputs.result != 'true' }}" + if: "${{ steps.service-changed.outputs.result != 'true' || github.head_ref != '' }}" shell: bash run: exit 1