From e50fb8b7c2187d9ef5a66028c345ff0a1d07ad23 Mon Sep 17 00:00:00 2001 From: Fiereu Date: Tue, 28 Jul 2026 12:28:34 +0200 Subject: [PATCH] fix(ci): Run spotlessApply on master too --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbcff5c..3e806aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,15 @@ jobs: uses: gradle/actions/setup-gradle@v6 - name: Apply Spotless and push formatting changes - # Only pull request branches from this repository, where the formatting - # commit can be pushed back. Everywhere else the spotlessCheck inside - # the check task must fail on violations instead of hiding them. + # Only pull request branches from this repository and on master, + # where the formatting commit can be pushed back. + # Everywhere else the spotlessCheck inside the check task must + # fail on violations instead of hiding them. if: >- - github.event_name == 'pull_request' && - github.event.pull_request.head.repo.full_name == github.repository && - github.event.pull_request.user.login != 'renovate[bot]' + (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch) + || (github.event_name == 'pull_request' + && github.event.pull_request.head.repo.full_name == github.repository + && github.event.pull_request.user.login != 'renovate[bot]') run: | ./gradlew spotlessApply if git diff --quiet; then