Skip to content

Commit

Permalink
Merge pull request #1160 from PCMDI/lee1043-patch-1
Browse files Browse the repository at this point in the history
Turn off github action for draft PRs
  • Loading branch information
lee1043 authored Oct 22, 2024
2 parents d6de986 + 4253156 commit 6a5c9f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

pull_request:
branches: [main]
types: [review_requested, ready_for_review]

workflow_dispatch:

Expand All @@ -15,6 +16,7 @@ env:

jobs:
check-jobs-to-skip:
if: ${{ github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
Expand All @@ -27,7 +29,7 @@ jobs:

pre-commit-hooks:
needs: check-jobs-to-skip
if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }}
if: ${{ (needs.check-jobs-to-skip.outputs.should_skip != 'true' || github.event_name == 'push') && github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -44,7 +46,7 @@ jobs:

build:
needs: check-jobs-to-skip
if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }}
if: ${{ (needs.check-jobs-to-skip.outputs.should_skip != 'true' || github.event_name == 'push') && github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -98,7 +100,7 @@ jobs:


publish-docs:
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
if: ${{ (github.event_name == 'push' || github.event_name == 'pull_request') && github.event.pull_request.draft != true }}
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -146,4 +148,4 @@ jobs:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
force_orphan: true

0 comments on commit 6a5c9f5

Please sign in to comment.