-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (33 loc) · 1.19 KB
/
allcontributors.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
on:
workflow_dispatch:
push:
branches:
- main
schedule:
# - cron: '0 12 * * 0' # weekly on Sunday at 12:00
- cron: '0 12 1 * *' # monthly on day 1 at 12:00
name: Update allcontributoes
jobs:
allcontributors:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Update allcontributors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 5
- name: Install allcontributors package
run: R CMD INSTALL .
- name: Update allcontributors
run: Rscript -e 'allcontributors::add_contributors()'
- name: Commit results
run: |
git config user.name "Github Actions"
git config user.email "[email protected]"
git commit README.md -m 'Update allcontributors on README.Rmd' || echo "No changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to commit"