Skip to content

Refresh Tiered Repo Catalog #1

Refresh Tiered Repo Catalog

Refresh Tiered Repo Catalog #1

name: Refresh Repo Catalog
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * 1"
permissions:
contents: write
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Refresh trending repository dataset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run data:refresh:repos
- name: Commit refreshed dataset
run: |
if git diff --quiet -- public/data/top-repos.json; then
echo "No dataset changes detected."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add public/data/top-repos.json
git commit -m "chore(data): refresh trending repo catalog"
git push