From 8a59ae80a341b841b8c1a68a0111407b4596cbb3 Mon Sep 17 00:00:00 2001 From: Joab <89288499+Joabutt@users.noreply.github.com> Date: Sat, 30 Dec 2023 00:49:56 +0800 Subject: [PATCH] Update check_pr.yml --- .github/workflows/check_pr.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 7003e72..0476f23 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -25,18 +25,21 @@ jobs: - name: Get list of changed domain files id: file_changes run: | + set -ex git fetch origin ${{ github.event.pull_request.base.ref }} git diff --name-only FETCH_HEAD..${{ github.sha }} | { grep '^domains/.*\.json$' || true; } > changed_files.txt cat changed_files.txt - - + - name: JSON Schema Validate run: | - while read file; do - npx ajv-cli validate -s .github/workflows/domain-schema.json -d $file - done < changed_files.txt + set -ex + while read file; do + echo "Validating file: ${file}" + npx ajv-cli validate -s .github/workflows/domain-schema.json -d $file + done < changed_files.txt continue-on-error: true + - name: Comment on PR if Invalid if: ${{ failure() }} uses: actions/github-script@v5