From 588b8699e1f58e4d46a95ed35a0fcaa6be4e86d4 Mon Sep 17 00:00:00 2001 From: Andrew Riha Date: Tue, 19 Mar 2024 23:09:23 -0700 Subject: [PATCH] Enable workflow based on preconditions --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3af5bc4..0242c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -31,6 +39,7 @@ jobs: black --check --diff . build-docs: + needs: [enable-workflow] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4