Skip to content

Commit b905054

Browse files
authored
ci: centralize update-readme workflow (#268)
1 parent 268c7f0 commit b905054

File tree

5 files changed

+11
-103
lines changed

5 files changed

+11
-103
lines changed
Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
1-
name: Data Fetch
1+
name: update-readme
22

33
on:
44
schedule:
5-
- cron: "0 8 * * *" # Every day at 1am PDT
5+
- cron: "0 8 * * *" # Runs every day at 08:00 AM UTC
6+
67
workflow_dispatch:
78

89
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Check out repo
13-
uses: actions/checkout@v5
14-
with:
15-
token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}
16-
17-
- name: Set up Node.js
18-
uses: actions/setup-node@v5
19-
20-
- name: Install npm packages
21-
run: npm install
22-
23-
- name: Update README with latest sponsor data
24-
run: npm run build:readme
25-
26-
- name: Setup Git
27-
run: |
28-
git config user.name "GitHub Actions Bot"
29-
git config user.email "<[email protected]>"
30-
31-
- name: Save updated files
32-
run: |
33-
chmod +x ./tools/commit-readme.sh
34-
./tools/commit-readme.sh
10+
update-readme:
11+
uses: eslint/workflows/.github/workflows/update-readme.yml@main
12+
secrets:
13+
workflow_push_bot_token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ dist/
6060

6161
src/build
6262
test.css
63+
64+
# Automatically generated files by GitHub Actions workflow
65+
tools/update-readme.js

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
"build:cts": "node -e \"fs.copyFileSync('dist/esm/index.d.ts', 'dist/cjs/index.d.cts')\" && node tools/update-cts.js dist/cjs/types.cts dist/cjs/index.d.cts",
6363
"build:rules": "node tools/build-rules.js",
6464
"build": "npm run build:rules && rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
65-
"build:readme": "node tools/update-readme.js",
6665
"build:update-rules-docs": "node tools/update-rules-docs.js",
6766
"build:baseline": "node tools/generate-baseline.js",
6867
"prepare": "npm run build",
6968
"pretest": "npm run build",
7069
"lint": "eslint",
70+
"lint:fix": "eslint --fix",
7171
"fmt": "prettier --write .",
7272
"fmt:check": "prettier --check .",
7373
"test": "mocha \"tests/**/*.test.js\"",
@@ -96,7 +96,6 @@
9696
"eslint": "^9.35.0",
9797
"eslint-config-eslint": "^13.0.0",
9898
"eslint-plugin-eslint-plugin": "^6.3.2",
99-
"got": "^14.4.2",
10099
"lint-staged": "^15.2.7",
101100
"mdast-util-from-markdown": "^2.0.2",
102101
"mdn-data": "^2.24.0",

tools/commit-readme.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

tools/update-readme.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)