Get Star Count #14624
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: 'Get Star Count' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 * * * *' | |
push: | |
branches: | |
- master | |
paths: "plugins-list/**" | |
concurrency: | |
group: 'get-star-count' | |
cancel-in-progress: true | |
jobs: | |
UpdateStarCount: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 'Set up node 18.x' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
- name: 'Install dependencies' | |
run: npm ci | |
working-directory: scripts | |
- name: 'Run get star count script' | |
timeout-minutes: 10 | |
run: node update-star-count | |
id: node | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
working-directory: scripts/update-star-count | |
- name: 'Commit' | |
run: | | |
git config --local user.email "github-actions[bot]" | |
git config --local user.name "github-actions[bot]@users.noreply.github.com" | |
git add --all | |
git commit -m "Update star count" | |
git push |