@@ -33,10 +33,23 @@ jobs:
33
33
PR_NUMBER : ${{ github.event.pull_request.number }}
34
34
GITHUB_SHA : ${{ github.event.pull_request.head.sha }}
35
35
steps :
36
+ - name : Get PR head SHA
37
+ if : ${{ github.event_name == 'pull_request' }}
38
+ id : pr
39
+ uses : actions/github-script@v7
40
+ with :
41
+ script : |
42
+ const { data: pr } = await github.rest.pulls.get({
43
+ owner: context.repo.owner,
44
+ repo: context.repo.repo,
45
+ pull_number: context.payload.pull_request.number,
46
+ });
47
+ core.setOutput("sha", pr.head.sha);core.setOutput("sha", pr.head.sha);
48
+
36
49
- name : Checkout and setup environment
37
50
uses : MetaMask/action-checkout-and-setup@v1
38
51
with :
39
- ref : ${{ inputs .pr-head- sha }}
52
+ ref : ${{ steps .pr.outputs. sha }}
40
53
is-high-risk-environment : false
41
54
skip-allow-scripts : true
42
55
yarn-custom-url : ${{ vars.YARN_URL }}
60
73
OWNER : ${{ github.repository_owner }}
61
74
REPOSITORY : ${{ github.event.repository.name }}
62
75
PR_NUMBER : ${{ github.event.pull_request.number }}
63
- GITHUB_SHA : ${{ github.event.pull_request.head .sha }}
76
+ GITHUB_SHA : ${{ steps.pr.outputs .sha }}
64
77
65
78
- name : Upload benchmark results
66
79
if : github.ref == 'refs/heads/main'
0 commit comments