Skip to content

Add eval workflow that triggers remote eval job #9

Add eval workflow that triggers remote eval job

Add eval workflow that triggers remote eval job #9

Workflow file for this run

# Run evaluation on a PR
name: Run Eval
# Runs when a PR is labeled with one of the "run-eval-" labels
on:
pull_request:
types: [labeled]
env:
ALLOWED_USERS: 'rbren,neubig,xingyaoww,mamoodi'
jobs:
trigger-job:
name: Trigger remote eval job
# TODO: Add different labels for different eval instances
if: ${{ github.event.label.name == 'run-eval-s' && contains(env.ALLOWED_USERS, github.event.sender.login) }}

Check failure on line 16 in .github/workflows/run-eval.yml

View workflow run for this annotation

GitHub Actions / Run Eval

Invalid workflow file

The workflow is not valid. .github/workflows/run-eval.yml (Line: 16, Col: 9): Unrecognized named-value: 'env'. Located at position 53 within expression: github.event.label.name == 'run-eval-s' && contains(env.ALLOWED_USERS, github.event.sender.login)
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Trigger remote job
run: |
REPO_URL="https://github.com/${{ github.repository }}"
PR_BRANCH="${{ github.head_ref }}"
echo "Repository URL: $REPO_URL"
echo "PR Branch: $PR_BRANCH"
curl -X POST \
-H "Authorization: Bearer ${{ secrets.PAT_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
-d "{\"ref\": \"main\", \"inputs\": {\"github-repo\": \"${REPO_URL}\", \"github-branch\": \"${PR_BRANCH}\"}}" \
https://api.github.com/repos/All-Hands-AI/evaluation/actions/workflows/create-branch.yml/dispatches