Skip to content

swagger option appears on SHOW_SWAGGER_UI_LINK #1

swagger option appears on SHOW_SWAGGER_UI_LINK

swagger option appears on SHOW_SWAGGER_UI_LINK #1

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