mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-29 21:09:29 +00:00
feat: data-driven README automation with YAML entries and GitHub Actions
This commit is contained in:
parent
20d7d4db6f
commit
25446b49eb
64 changed files with 1864 additions and 323 deletions
41
.github/workflows/generate-readme.yml
vendored
Normal file
41
.github/workflows/generate-readme.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: Auto-Generate README
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- shamanic/data-driven-automation
|
||||
paths:
|
||||
- 'data/**'
|
||||
|
||||
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: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "docs: auto-regenerate README from YAML data"
|
||||
file_pattern: "README.md"
|
||||
commit_user_name: "github-actions[bot]"
|
||||
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
39
.github/workflows/validate-pr.yml
vendored
Normal file
39
.github/workflows/validate-pr.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Validate PR YAML Files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'data/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Get changed YAML files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
files: |
|
||||
data/**/*.yaml
|
||||
|
||||
- name: Validate YAML files
|
||||
run: |
|
||||
if [[ -n "${{ steps.changed-files.outputs.all_changed_files }}" ]]; then
|
||||
node scripts/validate.js ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
else
|
||||
echo "No YAML files changed, skipping validation"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue