From 17f58cf6e982b2e379aa8f91ac9513960a885493 Mon Sep 17 00:00:00 2001 From: Jayson Grace Date: Sat, 16 May 2026 21:02:31 -0600 Subject: [PATCH] fix: upload autofix patch only on job failure when fixes are present **Changed:** - Updated the 'Upload autofix patch' step to run only if the job fails and fixes are present, reducing unnecessary artifact uploads in successful runs in `.github/workflows/pre-commit.yaml` --- .github/workflows/pre-commit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 3a784549..f52beb9b 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -140,7 +140,7 @@ jobs: echo "has-fixes=true" >> "$GITHUB_OUTPUT" - name: Upload autofix patch - if: ${{ steps.capture.outputs.has-fixes == 'true' }} + if: ${{ failure() && steps.capture.outputs.has-fixes == 'true' }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: autofix-patch