File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,17 +13,18 @@ jobs:
1313 runs-on : ubuntu-latest
1414 steps :
1515 - name : Download artifact
16- run : gh run download "${{ github.event.workflow_run.id }} " --repo "${{ github.repository } }" --name "comment"
16+ run : gh run download "${WORKFLOW_RUN_ID} " --repo "${GITHUB_REPOSITORY }" --name "comment"
1717 env :
1818 GITHUB_TOKEN : ${{ github.token }}
19+ WORKFLOW_RUN_ID : ${{ github.event.workflow_run.id }}
1920 - run : |
20- PR=$(grep -o '^[0-9]\+$' pr.txt)
21- PR_HEAD_SHA=$(gh api "/repos/${{ github.repository }} /pulls/${PR}" --jq .head.sha)
21+ PR=" $(grep -o '^[0-9]\+$' pr.txt)"
22+ PR_HEAD_SHA=" $(gh api "/repos/${GITHUB_REPOSITORY} /pulls/${PR}" --jq .head.sha)"
2223 # Check that the pull-request head SHA matches the head SHA of the workflow run
2324 if [ "${WORKFLOW_RUN_HEAD_SHA}" != "${PR_HEAD_SHA}" ]; then
2425 exit 1
2526 fi
26- cat comment.txt | gh pr comment "${PR}" --repo "${{ github.repository }} " -F -
27+ gh pr comment "${PR}" --repo "${GITHUB_REPOSITORY} " -F comment.txt
2728 env:
2829 GITHUB_TOKEN: ${{ github.token }}
2930 WORKFLOW_RUN_HEAD_SHA: ${{ github.event.workflow_run.head_commit.id }}
You can’t perform that action at this time.
0 commit comments