Update ci.yml

This commit is contained in:
William Harrison
2025-03-13 12:46:30 +08:00
committed by GitHub
parent ce714c2c20
commit 9847a656e8
+4 -10
View File
@@ -27,21 +27,15 @@ jobs:
- run: npm install
- name: Get PR author
if: github.event_name == 'pull_request'
run: echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
- name: Get PR labels
- name: Fetch PR information
if: github.event_name == 'pull_request'
run: |
echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
echo "PR_AUTHOR_ID=${{ github.event.pull_request.user.id }}" >> $GITHUB_ENV
LABELS=$(gh api --jq '[.labels[].name]' /repos/{owner}/{repo}/pulls/${{ github.event.number }})
echo "PR_LABELS=$LABELS" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ github.token }}
- name: Get changed files
if: github.event_name == 'pull_request'
run: |
FILES=$(gh api --jq '[.[] | select(.status != "removed") | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files)
echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV
env: