Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Mark the build as failed if 'do not merge' label is set #15062

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading