Skip to content

Commit

Permalink
Merge pull request #15062 from opensourcerouting/fix/mark_as_failed_i…
Browse files Browse the repository at this point in the history
…f_do_not_merge_labeled

github: Mark the build as failed if 'do not merge' label is set
  • Loading branch information
donaldsharp authored Jan 2, 2024
2 parents 54c2d32 + c733a38 commit 077fc27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/freeze.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
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:
types: [synchronize, opened, reopened, labeled, unlabeled]

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

0 comments on commit 077fc27

Please sign in to comment.