mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-28 04:19:27 +00:00
45 lines
1 KiB
YAML
45 lines
1 KiB
YAML
name: Auto-Generate README
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'data/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
generate:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
persist-credentials: true
|
|
|
|
- name: Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Generate README
|
|
run: node scripts/generate-readme.js
|
|
|
|
- name: Generate registry JSON
|
|
run: node scripts/export-json.js --pretty --output dist/registry.json
|
|
|
|
- name: Commit changes
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: "docs: auto-regenerate README and registry data"
|
|
file_pattern: "README.md dist/registry.json"
|
|
commit_user_name: "github-actions[bot]"
|
|
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
|