File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 64
64
".github/workflows/eamxx-sa-testing.yml"
65
65
)
66
66
pattern=$(IFS=\|; echo "${paths[*]}")
67
- changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
67
+
68
+ # Use the GitHub API to get the list of changed files
69
+ response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
70
+ "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files")
71
+
72
+ # Extract the filenames from the response
73
+ changed_files=$(echo "$response" | jq -r '.[].filename')
74
+
68
75
if [[ $changed_files =~ ^($pattern) ]]; then
69
76
echo "value=true" >> $GITHUB_OUTPUT
70
77
else
Original file line number Diff line number Diff line change 45
45
)
46
46
47
47
pattern=$(IFS=\|; echo "${paths[*]}")
48
- changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
48
+
49
+ # Use the GitHub API to get the list of changed files
50
+ response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
51
+ "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files")
52
+
53
+ # Extract the filenames from the response
54
+ changed_files=$(echo "$response" | jq -r '.[].filename')
55
+
49
56
if [[ $changed_files =~ ^($pattern) ]]; then
50
57
echo "value=true" >> $GITHUB_OUTPUT
51
58
else
Original file line number Diff line number Diff line change 57
57
".github/workflows/eamxx-v1-testing.yml"
58
58
)
59
59
pattern=$(IFS=\|; echo "${paths[*]}")
60
- changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
60
+
61
+ # Use the GitHub API to get the list of changed files
62
+ response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
63
+ "https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }}/files")
64
+
65
+ # Extract the filenames from the response
66
+ changed_files=$(echo "$response" | jq -r '.[].filename')
67
+
61
68
if [[ $changed_files =~ ^($pattern) ]]; then
62
69
echo "value=true" >> $GITHUB_OUTPUT
63
70
else
You can’t perform that action at this time.
0 commit comments