From 8c3b36f46480811676a6790da2ad1182c94d2d49 Mon Sep 17 00:00:00 2001 From: bvandekerkhof Date: Mon, 11 Mar 2024 15:29:53 +0100 Subject: [PATCH] Adding alternative if statement as job otherwise does not really fail and hence black and isort are not being run Signed-off-by: bvandekerkhof --- .github/workflows/code_formatting.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code_formatting.yml b/.github/workflows/code_formatting.yml index f108b64..b5481b1 100644 --- a/.github/workflows/code_formatting.yml +++ b/.github/workflows/code_formatting.yml @@ -27,12 +27,13 @@ jobs: pip install black pip install isort - name: Run isort, black checks + id: checks continue-on-error: true run: | isort . --check black . --check - name: Run isort and black when required and commit back - if: failure() + if: job.steps.checks.status == failure() env: GITHUB_ACCESS_TOKEN: ${{ secrets.OPENMCMC_TOKEN }} run: |