Skip to content

Commit ef20744

Browse files
author
jiangpeiling
committed
🔨 improve the CICD process.
1 parent ea337f3 commit ef20744

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

‎.github/workflows/docker-build-dev.yml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,20 @@ jobs:
1919
run: |
2020
echo "=== PR Files Debug Info ==="
2121
echo "Event name: ${{ github.event_name }}"
22-
echo "=== File paths (what contains() checks) ==="
23-
echo '${{ toJSON(github.event.pull_request.files.*.filename) }}'
24-
echo "=== Full file objects ==="
25-
echo '${{ toJSON(github.event.pull_request.files) }}'
22+
echo "PR number: ${{ github.event.pull_request.number }}"
23+
echo "PR head ref: ${{ github.event.pull_request.head.ref }}"
24+
echo "PR base ref: ${{ github.event.pull_request.base.ref }}"
25+
26+
# Try to get files via GitHub API
27+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
28+
echo "=== Fetching files via GitHub API ==="
29+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
30+
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" | \
31+
jq -r '.[].filename' | head -20
32+
fi
33+
34+
echo "=== Raw event data ==="
35+
echo '${{ toJSON(github.event) }}'
2636
echo "=== End Debug Info ==="
2737
- name: Check if should run
2838
run: |

0 commit comments

Comments
 (0)