Skip to content

Commit

Permalink
Only run CI on non-draft PRs (skyportal#5271)
Browse files Browse the repository at this point in the history
* Only run CI on non-draft PRs

* Trigger when draft status changes
  • Loading branch information
stefanv authored Sep 19, 2024
1 parent cbea28e commit 572e76c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60

if: github.repository_owner == 'skyportal'
if: github.repository_owner == 'skyportal' && github.event.pull_request.draft == false

services:
postgres:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_api_and_frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

jobs:
test:
test-api-and-frontend:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 120
services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
test:
if: github.event_name == 'push' || ${{ github.event.label.name == 'docker' }}
if: github.event_name == 'push' || github.event.label.name == 'docker'
name: Test Docker build
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ on:
- "skyportal/enum_types.py"
- "skyportal/facility_apis/__init__.py"
- "requirements.txt"
types: [opened, reopened, synchronize, ready_for_review]

jobs:
test:
test-migrations:
name: Test SkyPortal migrations
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 90
env:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

jobs:
test:
test-models:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 120

Expand Down

0 comments on commit 572e76c

Please sign in to comment.