Skip to content

fix(CI): Fixed build errors #662

fix(CI): Fixed build errors

fix(CI): Fixed build errors #662

Workflow file for this run

name: Format
on:
push:
paths-ignore:
- "Website/**"
- "*.md"
- "*.txt"
pull_request:
paths-ignore:
- "Website/**"
- "*.md"
- "*.txt"
workflow_dispatch:
jobs:
formatting:
name: Format Java files
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: 21
- name: Format Java files
run: mvn rewrite:run
- name: Commit changes
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
if [[ $(git status --porcelain) ]]; then
git commit -m "style: Formatted Java files"
fi
- name: Push changes
if: github.event_name != 'pull_request'
run: git push