feat: add user guide, higress gateway ip support and pr compliance (#… #1
This file contains hidden or 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: Code Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| code-format-check: | |
| name: Code Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Check Code Format | |
| run: mvn spotless:check | |
| continue-on-error: false | |
| - name: Comment on PR if format check fails | |
| if: failure() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: '## ❌ Code Format Check Failed\n\n' + | |
| 'Your code does not follow the project formatting standards.\n\n' + | |
| '**Please run the following command:**\n' + | |
| '```bash\n' + | |
| 'mvn spotless:apply\n' + | |
| '```\n\n' + | |
| 'Then commit the changes:\n' + | |
| '```bash\n' + | |
| 'git add .\n' + | |
| 'git commit -m "style: format code with spotless"\n' + | |
| 'git push\n' + | |
| '```\n\n' + | |
| 'The check will automatically re-run after you push.' | |
| }); | |
| # unit-tests: | |
| # name: Unit Tests | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v3 | |
| # - name: Set up JDK 17 | |
| # uses: actions/setup-java@v3 | |
| # with: | |
| # java-version: '17' | |
| # distribution: 'temurin' | |
| # cache: maven | |
| # - name: Run Tests | |
| # run: mvn test | |
| # build-check: | |
| # name: Build Check | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v3 | |
| # - name: Set up JDK 17 | |
| # uses: actions/setup-java@v3 | |
| # with: | |
| # java-version: '17' | |
| # distribution: 'temurin' | |
| # cache: maven | |
| # - name: Build Project | |
| # run: mvn clean package -DskipTests | |