diff --git a/.github/workflows/run_test_cases_pr_comment.yml b/.github/workflows/run_test_cases_pr_comment.yml index 137fde9fdfa..6c239812eb1 100644 --- a/.github/workflows/run_test_cases_pr_comment.yml +++ b/.github/workflows/run_test_cases_pr_comment.yml @@ -14,33 +14,35 @@ jobs: if: github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest steps: - - name: Download artifacts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUN_ID: ${{ github.event.workflow_run.id }} - run: | - gh run download -R "${{ github.repository }}" --name "pr.txt" "$RUN_ID" - gh run download -R "${{ github.repository }}" --name "comment.txt" "$RUN_ID" - gh run download -R "${{ github.repository }}" --name "commentwin.txt" "$RUN_ID" - [ -L pr.txt ] || [ -L comment.txt ] || [ -L commentwin.txt ] && exit 1 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ github.event.workflow_run.id }} + merge-multiple: true + path: ./artifacts + + - name: Display structure of downloaded files + run: | + ls -R ./artifacts - name: Set PR environment variable uses: actions/github-script@v7 with: script: | const fs = require('fs'); - const pr = Number(fs.readFileSync('pr.txt', 'utf8')); + const pr = Number(fs.readFileSync('./artifacts/pr.txt', 'utf8')); core.exportVariable('PR_NUMBER', pr); - name: Update Mac Comment uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 with: issue-number: ${{ env.PR_NUMBER }} - body-path: 'comment.txt' + body-path: './artifacts/comment.txt' - name: Update Win Comment uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 with: issue-number: ${{ env.PR_NUMBER }} - body-path: 'commentwin.txt' + body-path: './artifacts/commentwin.txt'