Skip to content

Commit

Permalink
Skip CI on draft PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ManiMozaffar committed Apr 29, 2024
1 parent faa5697 commit a0b789e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
tags:
- '**'
pull_request:
types: [opened, synchronize]
types: [opened, synchronize, reopened, ready_for_review]

jobs:
lint:
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -58,6 +59,7 @@ jobs:
- os: macos-latest
python-version: '3.9'

if: github.event.pull_request.draft != true
runs-on: ${{ matrix.os }}

env:
Expand Down Expand Up @@ -100,6 +102,7 @@ jobs:
env_vars: PYTHON,OS

npm-build:
if: github.event.pull_request.draft != true
runs-on: ubuntu-latest

steps:
Expand All @@ -114,7 +117,7 @@ jobs:
- run: tree src

check: # This job does nothing and is only used for the branch protection
if: always()
if: github.event.pull_request.draft != true
needs: [lint, test, npm-build]
runs-on: ubuntu-latest

Expand All @@ -127,7 +130,7 @@ jobs:

release:
needs: [check]
if: "success() && startsWith(github.ref, 'refs/tags/')"
if: "success() && startsWith(github.ref, 'refs/tags/') && github.event.pull_request.draft != true"
runs-on: ubuntu-latest
environment: release

Expand Down

0 comments on commit a0b789e

Please sign in to comment.