-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (40 loc) · 1.33 KB
/
update-contributors.yaml
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
name: Update CONTRIBUTORS.md
on:
schedule:
- cron: '0 2 * * *' # Runs every day at 2am UTC
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup jq
uses: dcarbone/install-jq-action@v2
- name: Update CONTRIBUTORS.md
run: |
echo "# Contributors" > CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
p=1
while true; do
s=$(curl "https://api.github.com/repos/mapiv/pypcd4/contributors?page=$p") || break
[ "0" = $(echo $s | jq length) ] && break
echo $s | jq -r '.[] | "* [" + .login + "](" + .html_url + ")"';
p=$((p+1))
done | sort -f | tee -a CONTRIBUTORS.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update CONTRIBUTORS.md
title: Update CONTRIBUTORS.md
body: |
This PR updates the list of contributors in CONTRIBUTORS.md.
This PR is automatically generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub Actions.
branch: update-contributors
add-paths: |
CONTRIBUTORS.md
labels: |
rd/chore