Skip to content

Commit 21f0498

Browse files
committed
add action to update file (test)
1 parent ec80a65 commit 21f0498

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update libraries stars count (test)
2+
on:
3+
push:
4+
branches: [stars-ci-test]
5+
workflow_dispatch:
6+
7+
8+
jobs:
9+
update-stars:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
- name: Install dependencies
23+
run: npm install node-fetch@2
24+
- name: Update stars in libraries-next.json
25+
run: node scripts/updateStars.js
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Commit and push changes
29+
run: |
30+
git config --global user.name 'javier-okta'
31+
git config --global user.email '[email protected]'
32+
git add .
33+
git commit -m "chore: update stars count [skip ci]" || echo "No changes to commit"
34+
git push
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)