Skip to content

Commit 6d120e7

Browse files
committed
👷 ci(workflows): skip CI runs on draft pull requests
- add `ready_for_review` to PR trigger types for linting and tests workflows - add conditional check to skip jobs when PR is in draft state
1 parent 7fa6158 commit 6d120e7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/linting.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
pull_request:
88
branches:
99
- main
10+
types: [opened, synchronize, reopened, ready_for_review]
1011

1112
jobs:
1213
lint-and-format:
1314
name: Linting and Formatting
15+
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
1416
runs-on: ubuntu-latest
1517

1618
steps:

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ on:
55
branches: [ main, dev ]
66
pull_request:
77
branches: [ main, dev ]
8+
types: [opened, synchronize, reopened, ready_for_review]
89

910
jobs:
1011
offline-tests:
1112
name: Offline Tests
13+
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
1214
runs-on: ubuntu-latest
1315

1416
strategy:

0 commit comments

Comments
 (0)