Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 18f429c

Browse files
Merge pull request #127 from Azure-Samples/evaltest7
Use a different way to push results in eval workflow
2 parents d21f892 + d49bd0b commit 18f429c

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

‎.github/workflows/evaluate.yaml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ jobs:
5656
body: "Starting evaluation! Check the Actions tab for progress, or wait for a comment with the results."
5757
})
5858
59-
- name: Checkout pull request 🏁
59+
- name: Checkout pull request
6060
uses: actions/checkout@v4
61-
with:
62-
ref: refs/pull/${{ github.event.issue.number }}/head
61+
62+
- name: Checkout Pull Request
63+
run: hub pr checkout ${{ github.event.issue.number }}
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6366

6467
- name: Install pgvector
6568
run: |
@@ -193,25 +196,11 @@ jobs:
193196
body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).`
194197
})
195198
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-
209199
- name: Commit and push eval results
210200
if: ${{ success() }}
211201
run: |
212202
git config --global user.name "github-actions[bot]"
213203
git config --global user.email "github-actions[bot]@users.noreply.github.com"
214-
git checkout -b temp-branch
215204
git add evals/results/pr${{ github.event.issue.number }}
216205
git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}"
217-
git push origin temp-branch:${{ steps.get_pr_branch.outputs.branch }}
206+
git push

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /