-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.01 KB
/
gh-meta.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
name: Fetch GitHub MetaData
on:
schedule:
# Runs at 00:00 UTC every day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
fetch-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: '21' # Adjust to the appropriate Node.js version
- name: Install Dependencies
run: |
npm install cheerio lodash @octokit/rest
- name: Fetch GitHub Repos
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
run: |
node ./action/dist/fetch-data.js
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add ghmeta.json
git commit -m 'github meta updated'
git push