forked from SNStatComp/awesome-official-statistics-software
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.47 KB
/
update.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Update
# Controls when the workflow will run
on:
schedule:
# run at 4 am first day of week:
- cron: '0 4 * * 1'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./js
steps:
- name: Check out repo
uses: actions/checkout@v4
# setup node
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
# retrieve pkg metadata
- name: get_metadata
run: node get_metadata.js
env:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
# aggregate metadata
- name: aggregate_metadata
run: node aggregate_metadata.js
# generate readme
- name: generate_readme_csv
run: node generate_readme_csv.js
# Commit files:
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ../metadata/
git commit -a -m "Add changes" --allow-empty
# push changes:
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}