From da4c1638eda419a4cf0e61f3663fe91e767f822b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Fuch=C3=9F?= Date: Fri, 20 Sep 2024 21:30:11 +0200 Subject: [PATCH] Create format.yml --- .github/workflows/format.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..0bf0b52 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,27 @@ +name: Format + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Build project with gradle + uses: gradle/actions/setup-gradle@v4 + - name: Format with Spotless + run: gradle spotlessApply + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Apply formatting changes