Update data #1
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
name: Update data | |
on: | |
schedule: | |
- cron: '0 0 * * 0' # At 00:00 on Sunday. | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Update stars | |
uses: ./.github/actions/update-stars | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update npm data | |
run: node scripts/updateNpm.js | |
- name: Run format | |
run: pnpm run format | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: "(AUTO) Update data" | |
title: "🤖 Update data" | |
body: Automatically fetch latest data from NPM, GitHub and GitLab | |
branch: ci-update-data | |
add-paths: src/lib/data/npm.json,src/lib/data/stars.json | |
delete-branch: true | |
token: ${{ secrets.GITHUB_TOKEN }} |