From 83b044f82af2c23f03aea656ec74131c37ec56cf Mon Sep 17 00:00:00 2001 From: nhthinh-axonivy Date: Thu, 2 Jan 2025 11:50:47 +0700 Subject: [PATCH] feature/IVYPORTAL-16678-SPIKE-Setup-Linter - update validation rule - create summary step --- .github/workflows/super-linter.yml | 37 +++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 79e7189996..1111daf2c4 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -29,4 +29,39 @@ jobs: env: DEFAULT_BRANCH: master GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_ALL_CODEBASE: true + VALIDATE_ALL_CODEBASE: false + VALIDATE_JAVA: true + VALIDATE_JAVASCRIPT: true + VALIDATE_JSON: true + VALIDATE_YAML: true + VALIDATE_XML: true + VALIDATE_CSS: true + LINTER_RULES_PATH: ./ + REPORT_OUTPUT: true + + - name: Upload Linter Report + if: always() + uses: actions/upload-artifact@v4 + with: + name: linter-report + path: /tmp/lint-results/ + + summary: + name: Generate Summary + needs: lint + runs-on: ubuntu-latest + steps: + - name: Download Linter Report + uses: actions/download-artifact@v4 + with: + name: linter-report + path: ./linter-report + + - name: Display Summary + run: | + if [ -f ./linter-report/linter.log ]; then + echo "### Linter Summary" > $GITHUB_STEP_SUMMARY + grep -E "ERROR|WARNING" ./linter-report/linter.log >> $GITHUB_STEP_SUMMARY + else + echo "### No Linter Issues Found" > $GITHUB_STEP_SUMMARY + fi \ No newline at end of file