-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.4 KB
/
refresh-bot.yml
File metadata and controls
50 lines (43 loc) · 1.4 KB
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
46
47
48
49
50
name: Refresh popularity signals
# Refreshes npm downloads, GitHub stars, and Homebrew installs for all apps.
# Writes data/popularity.json and opens a PR so the maintainer can review.
#
# No LLM. No API keys needed beyond the automatic GITHUB_TOKEN.
on:
schedule:
- cron: '0 6 * * 1' # weekly on Monday
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 10.12.1
- run: pnpm install --frozen-lockfile
- name: Fetch popularity signals
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/fetch-popularity.mjs
- name: Build sanity check
run: pnpm build
- name: Open PR if popularity changed
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: bot/popularity
base: master
delete-branch: true
commit-message: 'chore(data): refresh popularity signals'
title: 'chore(data): weekly popularity refresh'
body: |
Auto-refresh of `data/popularity.json` via npm/GitHub/Homebrew APIs.
Review the heat-score changes before merging.
labels: bot