Fix pre-commit labeled trigger system (#39523)
Signed-off-by: Fynn Schmitt-Ulms <fschmitt@redhat.com>
This commit is contained in:
@@ -2,6 +2,7 @@ name: pre-commit
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened, labeled]
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
@@ -15,7 +16,11 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-run-check:
|
pre-run-check:
|
||||||
if: github.event_name == 'pull_request'
|
if: >-
|
||||||
|
github.event_name == 'pull_request' &&
|
||||||
|
(github.event.action != 'labeled' ||
|
||||||
|
github.event.label.name == 'ready' ||
|
||||||
|
github.event.label.name == 'verified')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check PR label and author merge count
|
- name: Check PR label and author merge count
|
||||||
@@ -44,7 +49,12 @@ jobs:
|
|||||||
|
|
||||||
pre-commit:
|
pre-commit:
|
||||||
needs: pre-run-check
|
needs: pre-run-check
|
||||||
if: always() && (needs.pre-run-check.result == 'success' || needs.pre-run-check.result == 'skipped')
|
if: >-
|
||||||
|
always() &&
|
||||||
|
(github.event.action != 'labeled' ||
|
||||||
|
github.event.label.name == 'ready' ||
|
||||||
|
github.event.label.name == 'verified') &&
|
||||||
|
(needs.pre-run-check.result == 'success' || needs.pre-run-check.result == 'skipped')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
|||||||
Reference in New Issue
Block a user