Lm show h2console link #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "15-backend-format: Format Java Files" | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: [ src/** ] | |
push: | |
branches: [ main ] | |
paths: [ src/** ] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Java (version from .java-version file) | |
uses: actions/setup-java@v3 | |
with: | |
distribution: semeru # See: https://github.com/actions/setup-java#supported-distributions | |
java-version-file: ./.java-version | |
- name: Check formatting with Maven | |
run: mvn git-code-format:validate-code-format | |
- name: "IF STEP ABOVE FAILS ^^^ you need: mvn git-code-format:format-code" | |
if: failure() # Only run if the previous step failed | |
run: | | |
echo '# Note :warning:' >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo 'Some of your code is improperly formatted. ' >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo ' To fix it, try running this: ' >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo ' `mvn git-code-format:format-code` ' >> $GITHUB_STEP_SUMMARY | |
echo ' ' >> $GITHUB_STEP_SUMMARY | |