From 71732ddd818b9d29843c72566a6aa9877ae8225e Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 1 Apr 2025 12:11:37 -0700 Subject: [PATCH] [CI] Actually fix detect-changes for large PRs Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-detect-changes.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sycl-detect-changes.yml b/.github/workflows/sycl-detect-changes.yml index 2fd143acff97f..941d394202fca 100644 --- a/.github/workflows/sycl-detect-changes.yml +++ b/.github/workflows/sycl-detect-changes.yml @@ -19,16 +19,13 @@ jobs: steps: - name: Set changed_files id: changed_files - uses: actions/github-script@v7 - with: - script: | - const changedFiles = context.payload.pull_request.changed_files; - console.log("Number of files changed:", changedFiles); - return { changed_file_cnt: changedFiles } ; + shell: bash + run: | + echo "changed_file_cnt=${{ github.event.pull_request.changed_files }}" >> $GITHUB_OUTPUT - name: Check file changes uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 - if: ${{ steps.changed_files.outputs.changed_file_cnt < 500 }} + if: steps.changed_files.outputs.changed_file_cnt < 500 id: changes with: filters: | @@ -91,7 +88,7 @@ jobs: uses: actions/github-script@v7 with: script: | - if (context.payload.pull_request.changed_files < 500) { + if (${{steps.changed_files.outputs.changed_file_cnt}} < 500) { return '${{ steps.changes.outputs.changes }}'; } // Treat everything as changed for huge PRs.