mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-19 05:57:30 -04:00
[DW-31] Add a condition that prohibits checks to be run on draft PRs
Unfortunately, github actions doesn't support using "if" property in defaults and that's why we need to repeat it for all jobs
This commit is contained in:
committed by
piotrleniec-mudita
parent
dc99ba52ae
commit
2b754af627
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -1,10 +1,17 @@
|
||||
name: CI
|
||||
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
|
||||
jobs:
|
||||
check_commit_messages:
|
||||
name: check commit messages
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: clone repository
|
||||
@@ -14,12 +21,14 @@ jobs:
|
||||
- name: check commit messages
|
||||
run: ./tools/check_commit_messages.py
|
||||
build:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: build
|
||||
run: echo "Placeholder for old CI scripts"
|
||||
check_copyright_and_style:
|
||||
name: check copyright and style
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: clone repository
|
||||
@@ -35,6 +44,7 @@ jobs:
|
||||
|
||||
build_rt1051_binary:
|
||||
name: build rt1051 binary
|
||||
if: github.event.pull_request.draft == false
|
||||
needs:
|
||||
- check_copyright_and_style
|
||||
runs-on: self-hosted
|
||||
@@ -56,6 +66,7 @@ jobs:
|
||||
|
||||
build_linux_binary_and_run_tests:
|
||||
name: build linux binary and run tests
|
||||
if: github.event.pull_request.draft == false
|
||||
needs:
|
||||
- check_copyright_and_style
|
||||
runs-on: self-hosted
|
||||
|
||||
Reference in New Issue
Block a user