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 a013681

Browse files
Merge pull request #125 from Azure-Samples/evalchanges
Push results to branch
2 parents 2569544 + 666f7d9 commit a013681

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

‎.github/workflows/evaluate.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ permissions:
1414

1515
jobs:
1616
evaluate:
17-
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/evaluate') }}
17+
if: |
18+
contains('["OWNER", "CONTRIBUTOR", "COLLABORATOR", "MEMBER"]', github.event.comment.author_association) &&
19+
github.event.issue.pull_request &&
20+
github.event.comment.body == '/evaluate'
1821
runs-on: ubuntu-latest
1922
env:
2023
UV_SYSTEM_PYTHON: 1
@@ -41,10 +44,6 @@ jobs:
4144
AZURE_OPENAI_EVAL_DEPLOYMENT: ${{ vars.AZURE_OPENAI_EVAL_DEPLOYMENT }}
4245
AZURE_OPENAI_EVAL_MODEL: ${{ vars.AZURE_OPENAI_EVAL_MODEL }}
4346
steps:
44-
- name: Check for evaluate hash tag
45-
if: contains(github.event.comment.body, '#evaluate')
46-
run: |
47-
echo "Comment contains #evaluate hashtag"
4847

4948
- name: Comment on pull request
5049
uses: actions/github-script@v7
@@ -193,3 +192,13 @@ jobs:
193192
repo: context.repo.repo,
194193
body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).`
195194
})
195+
196+
- name: Commit and push eval results
197+
if: ${{ success() }}
198+
run: |
199+
git config --global user.name "github-actions[bot]"
200+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
201+
git checkout ${{ github.head_ref }}
202+
git add evals/results/pr${{ github.event.issue.number }}
203+
git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}"
204+
git push

0 commit comments

Comments
(0)

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