zephyr/.github/workflows/do_not_merge.yml
Fabio Baltieri fa8ebd3e45 ci: do_not_merge: pass instead of skip on mergeable PRs
Change the workflow to pass instead of skip if the PR is mergeable,
just trying to see if it helps with PRs not appearing as mergeable
because they do not match status:success when they should.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-20 16:23:35 +01:00

21 lines
711 B
YAML

name: Do Not Merge
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
name: Prevent Merging
runs-on: ubuntu-22.04
steps:
- name: Check for label
if: ${{ contains(github.event.*.labels.*.name, 'DNM') ||
contains(github.event.*.labels.*.name, 'TSC') ||
contains(github.event.*.labels.*.name, 'Architecture Review') ||
contains(github.event.*.labels.*.name, 'dev-review') }}
run: |
echo "Pull request is labeled as 'DNM', 'TSC', 'Architecture Review' or 'dev-review'."
echo "This workflow fails so that the pull request cannot be merged."
exit 1