From c733a38d849a75f64d529a7b148c699fc4e03de1 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 22 Dec 2023 10:29:52 +0200 Subject: [PATCH] github: Mark the build as failed if 'do not merge' label is set This prevents us from merging PRs marked as 'do not merge'. Signed-off-by: Donatas Abraitis --- .github/workflows/freeze.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/freeze.yml b/.github/workflows/freeze.yml index f3506d0061fb..a780298a425d 100644 --- a/.github/workflows/freeze.yml +++ b/.github/workflows/freeze.yml @@ -1,4 +1,4 @@ -name: Warn before merging if a "freeze" label exists +name: Warn before merging if a "freeze" or "do not merge" label exists on: pull_request_target: @@ -6,12 +6,12 @@ on: jobs: freeze_warning: - if: ${{ contains(github.event.*.labels.*.name, 'freeze') }} - name: Warn before merging if a "freeze" label exists + if: ${{ contains(github.event.*.labels.*.name, 'freeze') || contains(github.event.*.labels.*.name, 'do not merge') }} + name: Warn before merging if a "freeze" or "do not merge" label exists runs-on: ubuntu-latest steps: - name: Check for "freeze" label run: | - echo "Pull request is labeled as 'freeze'" + echo "Pull request is labeled as 'freeze' or 'do not merge'" echo "This workflow fails so that the pull request cannot be merged." exit 1