Skip to content

重构

重构 #1

Workflow file for this run

name: Generator
on:
push:
issues:
types: [opened, edited]
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: |
npm install
- name: Generate Data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node scripts/generator.js
- name: Setup Git Config
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and Push to output branch
run: |
git fetch origin output || true
git checkout -B output
git add --all
git commit -m "Update data from issues" || echo "No changes to commit"
git push -f origin output