AI Crawl Daily Update workflow (Barabama/FreeNodes)
The AI Crawl Daily Update workflow from Barabama/FreeNodes, explained and optimized by Latchkey.
CI health: C - fair
Point runs-on at Latchkey and get caching, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the AI Crawl Daily Update workflow from the Barabama/FreeNodes repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: AI Crawl Daily Update
on:
schedule:
- cron: "0 4 * * *" # daily at 12:00 Beijing time (UTC 04:00)
workflow_dispatch: # manual trigger
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: feat/ai-crawler-v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install project
run: |
pip install -e .
pip install playwright
playwright install --with-deps chromium
- name: Run crawler
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
run: python main.py
- name: Commit output
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Force-add files that may be gitignored (nodes/) or newly generated
git add --force nodes/*.txt nodes/*.yaml config.yaml README.md
# Only commit if there are changes
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "auto: daily crawl update"
git push
fi
The same workflow, on Latchkey
Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.
name: AI Crawl Daily Update on: schedule: - cron: "0 4 * * *" # daily at 12:00 Beijing time (UTC 04:00) workflow_dispatch: # manual trigger jobs: crawl: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Checkout uses: actions/checkout@v4 with: ref: feat/ai-crawler-v2 - name: Setup Python uses: actions/setup-python@v5 with: cache: 'pip' python-version: "3.12" - name: Install project run: | pip install -e . pip install playwright playwright install --with-deps chromium - name: Run crawler env: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} run: python main.py - name: Commit output run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" # Force-add files that may be gitignored (nodes/) or newly generated git add --force nodes/*.txt nodes/*.yaml config.yaml README.md # Only commit if there are changes if git diff --cached --quiet; then echo "No changes to commit" else git commit -m "auto: daily crawl update" git push fi
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Dependency installs
- End-to-end and browser tests
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.