|
58 | 58 | runs-on: ${{inputs.runner_tag}} |
59 | 59 |
|
60 | 60 | steps: |
| 61 | + - name: Dump GitHub context |
| 62 | + env: |
| 63 | + GITHUB_CONTEXT: ${{ toJson(github) }} |
| 64 | + run: echo "$GITHUB_CONTEXT" |
| 65 | + - name: Dump job context |
| 66 | + env: |
| 67 | + JOB_CONTEXT: ${{ toJson(job) }} |
| 68 | + run: | |
| 69 | + echo "$JOB_CONTEXT" |
| 70 | + echo context.issue.number |
| 71 | +
|
61 | 72 | # Workspace on self-hosted runners is not cleaned automatically. |
62 | 73 | # We have to delete the files created outside of using actions. |
63 | 74 | - name: Cleanup self-hosted workspace |
|
66 | 77 | ls -la ./ |
67 | 78 | rm -rf ./* || true |
68 | 79 |
|
69 | | - - uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v2.0.0 |
70 | | - id: comment-branch |
71 | | - if: ${{ always() && inputs.trigger != 'schedule' }} |
72 | | - |
73 | 80 | - name: Add comment to PR |
74 | 81 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
75 | 82 | if: ${{ always() && inputs.trigger != 'schedule' }} |
|
90 | 97 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
91 | 98 | with: |
92 | 99 | path: ur-repo |
93 | | - ref: ${{ steps.comment-branch.outputs.head_ref }} |
| 100 | + |
| 101 | + # On issue_comment trigger (for PRs) we need to fetch special ref for |
| 102 | + # proper PR's merge commit. Note, this ref may be absent if the PR is already merged. |
| 103 | + - name: Fetch PR's merge commit |
| 104 | + if: ${{ inputs.trigger != 'schedule' }} |
| 105 | + working-directory: ${{github.workspace}}/ur-repo |
| 106 | + run: | |
| 107 | + git fetch -- https://github.com/${{ github.repository }} +refs/pull/XXX/*:refs/remotes/origin/pr/XXX/* |
| 108 | + git checkout origin/pr/XXX/merge |
94 | 109 |
|
95 | 110 | - name: Checkout SYCL |
96 | 111 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
|
0 commit comments