diff --git a/.github/workflows/imports-fix.yml b/.github/workflows/imports-fix.yml new file mode 100644 index 000000000..6b19edbd4 --- /dev/null +++ b/.github/workflows/imports-fix.yml @@ -0,0 +1,30 @@ +name: Clean up Imports + +on: + pull_request: + branches: + - master + paths: + - 'src/main/java/**' + +jobs: + build: + + name: Clean up Imports + runs-on: ubuntu-latest + if: github.event.pull_request.base.repo.full_name == 'Slimefun/Slimefun4' + + steps: + - name: Checkout repository + uses: actions/checkout@v2.3.3 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1.4.3 + with: + java-version: 11 + - name: Google Java Format + uses: axel-op/googlejavaformat-action@v3.3.2 + with: + files: '**/*.java' + skipCommit: false + args: "--fix-imports-only --replace" + githubToken: ${{ secrets.ACCESS_TOKEN }}