mirror of
https://github.com/LCE-Hub/LCE-Workshop.git
synced 2026-07-15 23:10:50 +00:00
init
This commit is contained in:
33
.github/workflows/registry.yml
vendored
Normal file
33
.github/workflows/registry.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Generate Registry
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "**/meta.json"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "**/meta.json"
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Validate & generate registry.json
|
||||
run: node scripts/registry.js
|
||||
|
||||
- name: Commit registry.json
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add registry.json
|
||||
git diff --cached --quiet || git commit -m "chore: regenerate registry.json"
|
||||
git push
|
||||
Reference in New Issue
Block a user