From 2b41383e2be38b5299200f68fc78ad930165c0b2 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Fri, 21 Feb 2025 14:13:15 -0700 Subject: [PATCH] Allow pre-commit to be cancelled sooner --- .github/workflows/pre-commit-action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index fa9cacd1f66..f1ee6027e5b 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -48,14 +48,14 @@ jobs: cache-seed: ${{ inputs.cache-seed }} - name: Check ALL Files On Branch - if: github.event_name != 'pull_request' + if: ${{ !cancelled() && github.event_name != 'pull_request' }} env: SKIP: lint-salt,lint-tests,remove-import-headers,rstcheck run: | pre-commit run --show-diff-on-failure --color=always --all-files - name: Check Changed Files On PR - if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['repo'] + if: ${{ !cancelled() && github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['repo'] }} env: SKIP: lint-salt,lint-tests GH_ACTIONS_ANNOTATE: "1" @@ -63,6 +63,6 @@ jobs: pre-commit run --show-diff-on-failure --color=always --files ${{ join(fromJSON(inputs.changed-files)['repo_files'], ' ') }} - name: Check Docs On Deleted Files - if: github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['deleted'] + if: ${{ !cancelled() && github.event_name == 'pull_request' && fromJSON(inputs.changed-files)['deleted'] }} run: | pre-commit run --show-diff-on-failure --color=always check-docs --files ${{ join(fromJSON(inputs.changed-files)['deleted_files'], ' ') }}