From 5585170c7d2e05dfaa2e2e8192c4d46757bd40c9 Mon Sep 17 00:00:00 2001 From: Martin Bernstorff Date: Tue, 16 Sep 2025 22:05:08 +0200 Subject: [PATCH] ci: remove success message from formatting check (#858) * ci: remove success message from formatting check The workflow succeeds giving a green check-mark next to the commit id. Perhaps writing a comment each time is redundant? E.g.: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/pull/856 * Update spotless check workflow to handle failures Modify condition for PR comment action to run only on failure. --- .github/workflows/spotless-check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spotless-check.yml b/.github/workflows/spotless-check.yml index f4e616f..6fb1bbe 100644 --- a/.github/workflows/spotless-check.yml +++ b/.github/workflows/spotless-check.yml @@ -20,11 +20,12 @@ jobs: - name: spotless:check run: mvn spotless:check - uses: mshick/add-pr-comment@v2 - if: always() + # Only run if the previous step failed + if: failure() && steps.spotless_check.outcome == 'failure' with: proxy-url: https://slack-bots.azure.smilecdr.com/robogary/github message-success: | - Formatting check succeeded! + Formatting check succeeded! This should never run, because the step is skipped on workflow success. message-failure: | **This Pull Request has failed the formatting check**