From 20b9b7d74ea7cea7b76ef513b295d179ce6a520c Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 15 Oct 2024 15:11:21 +0100 Subject: [PATCH] update --- .github/workflows/vale.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 4ee1bb693cd..4963e4abcc8 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -57,12 +57,12 @@ jobs: files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }} separator: ' ' version: '2.27.0' - output: 'json' # Output the Vale results in JSON format for parsing - name: Check for Vale warnings id: check-vale-warnings run: | - if [[ $(jq '.warnings | length' < vale-output.json) -gt 0 ]]; then + vale_result=$(grep -c 'warning' <(cat /home/runner/reviewdog_issues.txt || true)) + if [ "$vale_result" -gt 0 ]; then echo "Vale found warnings or linting issues." echo "has_warnings=true" >> $GITHUB_ENV else @@ -71,6 +71,7 @@ jobs: fi continue-on-error: true + - name: Post comment if Vale finds issues if: ${{ env.has_warnings == 'true' }} run: |