Skip to content

Commit 2ed43c1

Browse files
committed
Don't trigger PR workflows on drafts
1 parent d333d35 commit 2ed43c1

9 files changed

Lines changed: 75 additions & 0 deletions

.github/workflows/build-android.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ on:
3434
type: string
3535

3636
jobs:
37+
Setup:
38+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
39+
runs-on: ubuntu-latest
40+
steps:
41+
- run: exit 0
42+
3743
#
3844
# Build Stride Runtime for Android
3945
#
4046
Android-Runtime:
47+
needs: Setup
4148
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
4249
runs-on: windows-latest
4350
steps:

.github/workflows/build-assembly-processor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ on:
3030
type: string
3131

3232
jobs:
33+
Setup:
34+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
35+
runs-on: ubuntu-latest
36+
steps:
37+
- run: exit 0
38+
3339
#
3440
# Build Assembly Processor
3541
#
3642
Assembly-Processor:
43+
needs: Setup
3744
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
3845
runs-on: windows-latest
3946
steps:

.github/workflows/build-ios.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ on:
3434
type: string
3535

3636
jobs:
37+
Setup:
38+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
39+
runs-on: ubuntu-latest
40+
steps:
41+
- run: exit 0
42+
3743
#
3844
# Build Stride Runtime for iOS
3945
#
4046
iOS-Runtime:
47+
needs: Setup
4148
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
4249
runs-on: windows-latest
4350
steps:

.github/workflows/build-linux-runtime.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ on:
4444
type: string
4545

4646
jobs:
47+
Setup:
48+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
49+
runs-on: ubuntu-latest
50+
steps:
51+
- run: exit 0
52+
4753
#
4854
# Build Stride Runtime for Linux
4955
#
5056
Linux-Runtime:
57+
needs: Setup
5158
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}, ${{ github.event.inputs.graphics-api || inputs.graphics-api || 'OpenGL' }})
5259
runs-on: windows-latest
5360
steps:

.github/workflows/build-vs-package.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,17 @@ on:
2929
type: string
3030

3131
jobs:
32+
Setup:
33+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- run: exit 0
37+
3238
#
3339
# Build Visual Studio Package
3440
#
3541
VS-Package:
42+
needs: Setup
3643
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
3744
runs-on: windows-latest
3845
steps:

.github/workflows/build-windows-full.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,17 @@ on:
2929
type: string
3030

3131
jobs:
32+
Setup:
33+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- run: exit 0
37+
3238
#
3339
# Build Stride for Windows
3440
#
3541
Windows:
42+
needs: Setup
3643
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }})
3744
runs-on: windows-latest
3845
steps:

.github/workflows/build-windows-runtime.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@ on:
4747
type: string
4848

4949
jobs:
50+
Setup:
51+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
52+
runs-on: ubuntu-latest
53+
steps:
54+
- run: exit 0
55+
5056
#
5157
# Build Stride Runtime for Windows
5258
#
5359
Windows-Runtime:
60+
needs: Setup
5461
name: Build (${{ github.event.inputs.build-type || inputs.build-type || 'Debug' }}, ${{ github.event.inputs.graphics-api || inputs.graphics-api || 'Direct3D11' }})
5562
runs-on: windows-latest
5663
steps:

.github/workflows/test-linux.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ on:
2727
type: string
2828

2929
jobs:
30+
Setup:
31+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
32+
runs-on: ubuntu-latest
33+
steps:
34+
- run: exit 0
35+
3036
#
3137
# Test Stride on Linux
3238
#
3339
Linux-Tests:
40+
needs: Setup
3441
name: Test (${{ github.event.inputs.build-type || inputs.build-type }}, ${{ github.event.inputs.test-category || inputs.test-category }})
3542
runs-on: ubuntu-latest
3643
steps:

.github/workflows/test-windows.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Test Windows
22

33
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/test-windows.yml'
7+
- 'build/Stride.Tests.*.slnf'
8+
- 'deps/**'
9+
- 'sources/**'
10+
- '!**/.all-contributorsrc'
11+
- '!**/.editorconfig'
12+
- '!**/.gitignore'
13+
- '!**/*.md'
14+
- '!crowdin.yml'
15+
types: [opened, synchronize, reopened, ready_for_review]
416
workflow_dispatch:
517
inputs:
618
build-type:
@@ -28,10 +40,17 @@ on:
2840
type: string
2941

3042
jobs:
43+
Setup:
44+
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event.pull_request.draft == false }}
45+
runs-on: ubuntu-latest
46+
steps:
47+
- run: exit 0
48+
3149
#
3250
# Test Stride on Windows
3351
#
3452
Windows-Tests:
53+
needs: Setup
3554
name: Test (${{ github.event.inputs.build-type || inputs.build-type }}, ${{ github.event.inputs.test-category || inputs.test-category }})
3655
runs-on: windows-latest
3756
steps:

0 commit comments

Comments
 (0)