LLM Evals in GitHub Actions with Slack Alerts: A Practical Setup

To run LLM evals in GitHub Actions, trigger a workflow on pull requests that touch prompts or model code, run your eval command so it exits non-zero on a regression, and add a failure-only step that posts to a Slack incoming webhook. Use path filters and concurrency to control cost, a timeout so a stuck run cannot hang the pipeline, and remember that repository secrets are not available to pull requests from forks.
Most teams that want automated LLM checks end up in the same place: GitHub Actions for the trigger, Slack for the alert. This is a practical walk through that setup, with a complete workflow you can adapt and the sharp edges that usually cost people an afternoon. The conceptual background, why a regression gate beats a dashboard, is in our guide to LLM regression testing in CI/CD; this post is the wiring.
What the pipeline should do
- Run only when something that can change model behavior changed: prompts, model code, retrieval settings, or the eval dataset.
- Run the evals against your dataset and compare with a baseline.
- Fail the check, and therefore block the merge, when a regression at or above your chosen severity appears.
- Tell people where they already are, in Slack, with a link straight to the failing run.
The workflow
This example uses EvalCI's command line, which waits for the run to finish and exits non-zero when a regression meets the severity you set. If you use a different tool, replace that one line with your own eval command. The important contract is the same: a non-zero exit code means "block".
name: llm-evals
on:
pull_request:
paths:
- "prompts/**"
- "app/llm/**"
- "evals/**"
concurrency:
group: llm-evals-${{ github.ref }}
cancel-in-progress: true
jobs:
evals:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Run evals and gate the merge
env:
BRANCH: ${{ github.head_ref }}
# add the API URL and key your eval service expects here
run: |
evals run --wait --git-branch="$BRANCH" --fail-on-regression critical
- name: Notify Slack on failure
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
PR_TITLE: ${{ github.event.pull_request.title }}
ACTOR: ${{ github.actor }}
run: |
curl -sS -X POST -H 'Content-type: application/json' \
--data "$(jq -n --arg t "LLM eval regression blocked a PR: $PR_TITLE (by $ACTOR) $RUN_URL" '{text: $t}')" \
"$SLACK_WEBHOOK_URL"
Why each part is there
- paths filter: evals cost tokens and time. Running them on a README change is waste. List the directories where prompts, model calls and eval data live.
- concurrency with cancel-in-progress: when someone pushes three commits in a row, only the latest run matters. This keeps your bill and your queue under control.
- timeout-minutes: an eval run that hangs on a rate limit should fail the job, not block the runner for six hours.
- --fail-on-regression critical: only regressions at or above that severity fail the check. Lower-severity changes appear in the report without stopping the merge. Adjust the level to your tolerance.
- if: failure(): the Slack step runs only when an earlier step failed, so the channel stays quiet when things are fine.
Setting up the Slack side
- Create a Slack app for your workspace and enable Incoming Webhooks.
- Add a webhook for the channel that should receive alerts and copy its URL.
- In GitHub, add the URL as a repository secret named SLACK_WEBHOOK_URL.
- Keep the alert short: what failed, who triggered it, and a link. Anything longer belongs in the run logs.
The workflow builds the JSON with jq rather than string concatenation. That matters because pull request titles can contain quotes and other characters that would otherwise break the payload or, worse, let someone inject content into the command.
The sharp edges
Fork pull requests do not get your secrets. GitHub does not expose repository secrets to workflows triggered by pull requests from forks. For an internal team repository this is irrelevant. For an open-source project, your eval step and Slack step will fail on contributor PRs. Options are to run a reduced, secret-free check on forks (for example a deterministic mock model), or to have a maintainer trigger the full run after review. Avoid switching to pull_request_target casually, because it runs with secrets against code from the fork.
Real model calls are slow, flaky and cost money. CI runs that call a live model API can fail because of rate limits or provider incidents, not because of your change. A common pattern is a deterministic mock model for the fast PR check and a real-model run on a schedule or before release. Whatever you choose, retry transient errors inside the eval tool rather than re-running the whole job.
Noisy gates get switched off. If the check fails for reasons the team does not trust, it will be disabled within weeks. Keep the dataset fixed and versioned, pin the judge model, and start with a high severity threshold. Tighten it once people believe the signal.
Make the check required. A passing or failing check only blocks a merge if you mark it as required in your branch protection rules. Many teams build the whole pipeline and forget this last step.
If you are still building the dataset behind this, start with setting up golden datasets. For the reasoning behind gating at all, read LLM regression testing in your CI/CD pipeline, and for the tool itself see EvalCI or the evals-in-CI essay.
See also: regression testing fine-tuned models across monthly releases.
Frequently asked questions
Can I use this with a tool other than EvalCI?
Yes. The pattern is independent of the tool. Replace the eval command with one that exits non-zero on failure, such as a Promptfoo or DeepEval run, and keep the trigger, the concurrency settings and the Slack step as they are.
How do I post the result as a pull request comment instead of Slack?
Use the GitHub API from a step in the same job, for example with the actions/github-script action, and write the summary to the pull request. Many teams do both: a comment with details for the author and a Slack message for the wider team on failure.
How often should evals run?
On every change that can affect model behavior, using path filters to avoid waste, plus a scheduled run against the real model to catch provider-side drift that no code change caused.
The takeaway
Run on the right changes, gate on a non-zero exit code, alert on failure only, and make the check required. The tooling is a few dozen lines of YAML. The value comes from the dataset and the thresholds behind it, and from keeping the signal trustworthy enough that people do not turn it off.

Have a similar challenge?
Book a free 30-minute architecture call and we'll tell you honestly whether and how we can help.
Book Free Discovery Call →