Tried actions/checkout Today: The Small GitHub Action Behind Fast AI CI
actions/checkout gained +5 stars today, and that makes sense: it’s still the boring-but-essential first step in most GitHub Actions pipelines.
It checks out your repository into the runner workspace so subsequent jobs can run tests, build Docker images, inspect prompts, or call an AI gateway against the current codebase. For indie teams, the value is simple: no custom Git cloning scripts, fewer auth edge cases, and predictable CI setup.
My default is shallow checkout (fetch-depth: 1) for faster runs. Only fetch full history when release tooling, changelogs, or version calculation actually needs it.
Here’s a compact workflow that checks out the repo, then sends a changed-file summary to an OpenAI-compatible relay using claude-fable-5:
name: AI code review
on:
pull_request:
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout PR code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Ask AI gateway for review notes
env:
OPENAI_BASE_URL: https://b-lost.com/v1
OPENAI_API_KEY: ${{ secrets.B_LOST_API_KEY }}
run: |
git diff --unified=0 origin/${{ github.base_ref }}...HEAD > changes.diff
curl "$OPENAI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5",
"messages": [
{"role":"system","content":"Review this diff. Return concise, actionable issues only."},
{"role":"user","content":"'"$(cat changes.diff | jq -Rs .)"'"}
]
}'
For larger repo-context prompts, I’d switch to the native Anthropic /v1/messages API path where supported. B-Lost’s relay supports native Anthropic prompt caching, which can cut cache-hit input costs by up to 90%—useful when each PR repeatedly includes the same coding standards, architecture docs, and review rubric.
The relay’s 0.8x official list pricing is also a practical optimization for CI workloads that grow quietly over time. The main takeaway: pair a reliable checkout step with shallow clones, scoped diffs, and cached prompt context. That’s how a “simple AI review workflow” stays cheap enough to keep running on every PR.
Top comments (0)