Skip to content

Commit 8033329

Browse files
authored
[CI] Actually fix detect-changes for large PRs (#17786)
Shown working [here](https://github.com/sarnex/llvm/actions/runs/14203819229/job/39796735530?pr=2). Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 724c07d commit 8033329

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/sycl-detect-changes.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ jobs:
1919
steps:
2020
- name: Set changed_files
2121
id: changed_files
22-
uses: actions/github-script@v7
23-
with:
24-
script: |
25-
const changedFiles = context.payload.pull_request.changed_files;
26-
console.log("Number of files changed:", changedFiles);
27-
return { changed_file_cnt: changedFiles } ;
22+
shell: bash
23+
run: |
24+
echo "changed_file_cnt=${{ github.event.pull_request.changed_files }}" >> $GITHUB_OUTPUT
2825
2926
- name: Check file changes
3027
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
31-
if: ${{ steps.changed_files.outputs.changed_file_cnt < 500 }}
28+
if: steps.changed_files.outputs.changed_file_cnt < 500
3229
id: changes
3330
with:
3431
filters: |
@@ -91,7 +88,7 @@ jobs:
9188
uses: actions/github-script@v7
9289
with:
9390
script: |
94-
if (context.payload.pull_request.changed_files < 500) {
91+
if (${{steps.changed_files.outputs.changed_file_cnt}} < 500) {
9592
return '${{ steps.changes.outputs.changes }}';
9693
}
9794
// Treat everything as changed for huge PRs.

0 commit comments

Comments
 (0)