Skip to content

Commit

Permalink
Enable workflow based on preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
apriha committed Mar 20, 2024
1 parent ba62d80 commit 588b869
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ on:
branches: '**'

jobs:
enable-workflow:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'schedule' && github.repository == 'apriha/lineage') }}
steps:
- name: Enable workflow based on preconditions
run: echo "Workflow enabled."

lint:
needs: [enable-workflow]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,6 +39,7 @@ jobs:
black --check --diff .
build-docs:
needs: [enable-workflow]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 588b869

Please sign in to comment.