set workflow PR triggers to filter PR-types (#2065)

* set workflow PR triggers to filter PR-types
- `review_requested`
- `ready_for_review`

* fail tests if draft pr

* add more types to test pr triggers

* remove unneeded condition

* readd condition

* leave PR-types default, only verify PRs to main
and fail for draft-PRs

* set types to cancel when converted to draft
This commit is contained in:
Matthias Wild 2022-12-18 21:54:07 +01:00 committed by GitHub
parent 147834e99c
commit 82f59829b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View File

@ -3,18 +3,29 @@ on:
push:
branches:
- 'main'
- 'development'
pull_request:
branches:
- 'main'
- 'development'
types:
- 'ready_for_review'
- 'opened'
- 'synchronize'
- 'converted_to_draft'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-22.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1
matrix:
if: github.event.pull_request.draft == false
strategy:
matrix:
stable-diffusion-model:

View File

@ -3,18 +3,28 @@ on:
push:
branches:
- 'main'
- 'development'
pull_request:
branches:
- 'main'
- 'development'
types:
- 'ready_for_review'
- 'opened'
- 'synchronize'
- 'converted_to_draft'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-18.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1
matrix:
if: github.event.pull_request.draft == false
strategy:
matrix:
stable-diffusion-model: