Fix stars update script to use PNPM + increase frequency (#451)

This commit is contained in:
MacFJA
2023-09-09 22:04:09 +02:00
committed by GitHub
parent 2baff7139b
commit a279cf36d8

View File

@@ -2,32 +2,35 @@ name: Update stars count
on: on:
schedule: schedule:
- cron: '0 0 1 * *' # Every 1st of every month at 00:00 - cron: '0 0 * * 0' # At 00:00 on Sunday.
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup node with version 16 - uses: pnpm/action-setup@v2.2.4
uses: actions/setup-node@v3
with: with:
node-version: '16.x' version: 8
registry-url: 'https://registry.npmjs.org' - uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: pnpm install
- name: Run script - name: Run script
uses: ./.github/actions/update-stars uses: ./.github/actions/update-stars
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Run format - name: Run format
run: npm run format run: pnpm run format
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v4 uses: peter-evans/create-pull-request@v4
with: with:
author: github_actions author: github_actions
commit-message: "(AUTO) Update stars" commit-message: "(AUTO) Update stars"
title: "BOT: Update stars" title: "🤖 Update stars"
body: Update all stars count from Github and Gitlab body: Update all stars count from Github and Gitlab
branch: ci-update-stars branch: ci-update-stars
add-paths: src/lib/stars.json add-paths: src/lib/stars.json