Skip to content

Initialize the project #29

Initialize the project

Initialize the project #29

Workflow file for this run

name: Google Java Style Format
on:
pull_request:
branches: [ master, develop ]
jobs:
java-formatting:
if: ${{ !contains(github.event.commits[0][message], 'Apply Google Java Style Format') }}

Check failure on line 9 in .github/workflows/java-format.yml

View workflow run for this annotation

GitHub Actions / Google Java Style Format

Invalid workflow file

The workflow is not valid. .github/workflows/java-format.yml (Line: 9, Col: 9): Unrecognized named-value: 'message'. Located at position 35 within expression: !contains(github.event.commits[0][message], 'Apply Google Java Style Format')
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Check for Java files
id: check_java_files
run: |
if [ -n "$(find . -name '*.java' -print -quit)" ]; then
echo "java_files_exist=true" >> $GITHUB_OUTPUT
else
echo "java_files_exist=false" >> $GITHUB_OUTPUT
fi
- name: Google Java Style Format
if: steps.check_java_files.outputs.java_files_exist == 'true'
uses: axel-op/googlejavaformat-action@v3
with:
# --aosp: 4-space indentation
args: "--replace --aosp"
# Can not auto commit, we'll commit manually
skip-commit: true
- name: Commit Changes
if: steps.check_java_files.outputs.java_files_exist == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply Google Java Style Format"