Skip to content

Commit cdd507d

Browse files
authored
chore: detect file changes by GitHub CLI (#2452)
1 parent 10f57d8 commit cdd507d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/plugin-e2e-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ jobs:
3333

3434
- id: filter
3535
name: Detect changed plugins
36+
env:
37+
GH_TOKEN: ${{ github.token }}
3638
run: |
37-
# Determine base SHA for comparison
3839
if [ "${{ github.event_name }}" == "pull_request" ]; then
39-
BASE_SHA="${{ github.event.pull_request.base.sha }}"
40+
CHANGED_FILES=$(gh pr view -R ${{ github.repository }} ${{ github.event.pull_request.number }} --json files --jq '.files[].path')
4041
else
4142
if [ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]; then
4243
BASE_SHA="HEAD~1"
4344
else
4445
BASE_SHA="${{ github.event.before }}"
4546
fi
47+
CHANGED_FILES=$(git diff --name-only $BASE_SHA HEAD)
4648
fi
4749
48-
CHANGED_FILES=$(git diff --name-only $BASE_SHA HEAD)
49-
5050
# Find all manifest.yaml files
5151
MANIFESTS=$(find . -name "manifest.yaml" -not -path "*/.*")
5252

0 commit comments

Comments
 (0)