mirror of
https://github.com/tiennm99/awesome-coding-agents.git
synced 2026-05-25 15:58:34 +00:00
03704df0a5
Go updater that fetches AI agent coding tool repo stats via GitHub GraphQL (batched, one query), sorts by star count, appends a daily snapshot to data/history.jsonl, and regenerates README.md from templates/readme.tmpl. Daily workflow at .github/workflows/update.yml refreshes rankings and commits changes. Seed list in data/agents.yml covers 19 tracked repos.
50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
YAML
name: Update rankings
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'data/agents.yml'
|
|
- 'templates/**'
|
|
- '**.go'
|
|
- 'go.mod'
|
|
- '.github/workflows/update.yml'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: update-rankings
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
cache: true
|
|
|
|
- name: Run updater
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: go run .
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add README.md data/history.jsonl
|
|
if git diff --staged --quiet; then
|
|
echo "no changes"
|
|
exit 0
|
|
fi
|
|
git commit -m "chore: daily ranking refresh"
|
|
git push
|