diff --git a/.github/workflows/pr-nightly-comment.yml b/.github/workflows/pr-nightly-comment.yml index ddc10298cb..11ca54e346 100644 --- a/.github/workflows/pr-nightly-comment.yml +++ b/.github/workflows/pr-nightly-comment.yml @@ -5,7 +5,10 @@ on: types: [completed] jobs: pr_comment: - if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' + if: | + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' && + !contains(fromJson(github.event.workflow_run.pull_requests).*.labels.*.name, 'no test needed') runs-on: ubuntu-latest steps: - name: Get the PR number diff --git a/.github/workflows/pr-nightly.yml b/.github/workflows/pr-nightly.yml index ad7d13bd27..a083a07358 100644 --- a/.github/workflows/pr-nightly.yml +++ b/.github/workflows/pr-nightly.yml @@ -16,6 +16,7 @@ env: jobs: build: + if: ${{ !contains(github.event.pull_request.labels.*.name, 'no test needed') }} runs-on: windows-latest steps: