mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-28 12:29: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
43
.github/PULL_REQUEST_TEMPLATE.md
vendored
43
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -1,38 +1,17 @@
|
|||
## Submission Type
|
||||
## New Entry Submission
|
||||
|
||||
- [ ] Plugin
|
||||
- [ ] Project
|
||||
- [ ] Theme
|
||||
- [ ] Agent
|
||||
- [ ] Resource
|
||||
**Category:** (plugins / themes / agents / projects / resources)
|
||||
|
||||
## Details
|
||||
**File added:** `data/{category}/your-entry.yaml`
|
||||
|
||||
**Name:**
|
||||
**Repository:**
|
||||
**Description:**
|
||||
### Checklist
|
||||
|
||||
## Checklist
|
||||
- [ ] YAML file is in the correct category folder
|
||||
- [ ] Filename is kebab-case (e.g., `my-plugin.yaml`)
|
||||
- [ ] All required fields included (name, repo, description, full_description)
|
||||
- [ ] Repository is public and maintained
|
||||
- [ ] Entry is relevant to OpenCode
|
||||
|
||||
- [ ] Relevant to OpenCode
|
||||
- [ ] Repository is public and accessible
|
||||
- [ ] Actively maintained
|
||||
- [ ] Not a duplicate
|
||||
- [ ] Entry added in alphabetical order
|
||||
### Description
|
||||
|
||||
## Entry Format
|
||||
|
||||
Use this format in the appropriate README section:
|
||||
|
||||
```html
|
||||
<details>
|
||||
<summary><b>Name</b> <img src="https://badgen.net/github/stars/owner/repo" height="14"/> - <i>Short description</i></summary>
|
||||
<blockquote>
|
||||
Full description.
|
||||
<br><br>
|
||||
<a href="https://github.com/owner/repo">🔗 <b>View Repository</b></a>
|
||||
</blockquote>
|
||||
</details>
|
||||
```
|
||||
|
||||
See [contributing.md](contributing.md) for full instructions.
|
||||
Brief description of what this entry does and why it should be included.
|
||||
|
|
|
|||
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