File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,25 @@ jobs:
193
193
body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).`
194
194
})
195
195
196
+ - name : Get PR branch name
197
+ id : get_pr_branch
198
+ uses : actions/github-script@v7
199
+ with :
200
+ script : |
201
+ const prNumber = context.issue.number;
202
+ const { data: pr } = await github.pulls.get({
203
+ owner: context.repo.owner,
204
+ repo: context.repo.repo,
205
+ pull_number: prNumber
206
+ });
207
+ return { branch: pr.head.ref };
208
+
196
209
- name : Commit and push eval results
197
210
if : ${{ success() }}
198
211
run : |
199
212
git config --global user.name "github-actions[bot]"
200
213
git config --global user.email "github-actions[bot]@users.noreply.github.com"
201
- git checkout ${{ github.head_ref }}
214
+ git checkout -b temp-branch
202
215
git add evals/results/pr${{ github.event.issue.number }}
203
216
git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}"
204
- git push
217
+ git push origin temp-branch:${{ steps.get_pr_branch.outputs.branch }}
You can’t perform that action at this time.
0 commit comments