.github/workflows/run.yml #33663
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: "*/5 * * * *" | |
workflow_dispatch: | |
jobs: | |
generate: | |
name: Generate repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Run generator | |
run: node index.js | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git fetch origin main | |
git checkout main | |
git add repo.json | |
git diff --cached --quiet && exit 0 | |
git commit -m "Update repository" | |
git push |