-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (42 loc) · 1.25 KB
/
update_repos.yml
File metadata and controls
49 lines (42 loc) · 1.25 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
name: Get starred repositories
on:
schedule:
- cron: "0 0 */7 * *"
workflow_dispatch:
push:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
envkey_API_KEY: ${{ secrets.API_KEY }}
envkey_API_BASE: ${{ secrets.API_BASE }}
envkey_API_MODEL: ${{ secrets.API_MODEL }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Fetch repositories
run: node get_repos.js
- name: Commit and push changes
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add README.md
git commit -m "Update README with starred repositories" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}