-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (44 loc) · 1.28 KB
/
update-credits.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
name: Update Credits
on:
push:
branches:
- main
files:
- '.github/workflows/update-credits.yml'
- '_scripts/generate-credits.js'
- '_scripts/credits.md'
- '_data/contributors.json'
- '_data/licenses.json'
workflow_dispatch:
jobs:
update-credits:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: v18.x
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: npm install
run: npm ci
- name: Download contributors list and commit
run: |
cd ${GITHUB_WORKSPACE}/_data
wget -O contributors.json https://api.github.com/repositories/240875926/contributors?anon=0
- name: Generate credits.md
run: node ./_scripts/generate-credits.js
- name: git add & commit & push
uses: EndBug/add-and-commit@v9
with:
add: './about/credits.md'
default_author: github_actions
message: 'docs: update credits.md'
push: true
- name: git add & commit & push
uses: EndBug/add-and-commit@v9
with:
add: './_data/contributors.json'
default_author: github_actions
message: 'docs: update contributors.json'
push: true