-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1.09 KB
/
update-stats.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Update API data
on:
schedule:
# Runs at 12:00 AM UTC on Sunday
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
run-node-command:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/[email protected]
- name: Update stargazers count
run: get_stargazers_count.js
- name: Update github dependents count
run: bun get_github_dependents_count.js
- name: Update jsdelivr download count
run: bun get_jsdelivr_download_count.js
- name: Update npm downloads count
run: bun get_npm_downloads_count.js
- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "Pouya Saadeghi"
- name: Commit changes
run: |
git add .
git diff-index --quiet HEAD || git commit -m "Update API data"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}