-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.62 KB
/
metrics.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
name: metrics
on:
schedule:
- cron: "0 09 * * 1" # weekly
workflow_dispatch:
jobs:
metrics:
runs-on: ubuntu-22.04
permissions:
contents: write
name: metrics
steps:
- uses: actions/checkout@v4
- name: Setup r2u
uses: eddelbuettel/github-actions/r2u-setup@master
with:
bspm-version-check: "FALSE"
- name: Install dependencies
run: sudo bash scripts/ci/install-dependencies.sh
- name: Download metrics
env:
GITHUB_PAT: ${{ secrets.MANUALLY_ADDED_REPO_SECRET_WORKFLOWR_BOT }}
run: |
Rscript scripts/github-rate.R
#Rscript scripts/github-projects.R data/github-projects.txt
Rscript scripts/github-rate.R
Rscript scripts/github-stars.R data/github-stars.txt
Rscript scripts/cranlogs.R data/cranlogs.txt
Rscript scripts/packagerank.R data/packagerank.txt
Rscript scripts/github-watchers.R data/github-watchers.txt
Rscript scripts/github-forks.R data/github-forks.txt
Rscript scripts/github-views.R data/github-views.txt
Rscript scripts/github-clones.R data/github-clones.txt
- name: Rerender README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
- name: Commit and push updated metrics
if: success()
run: |
git config user.name "workflowr-bot"
git config user.email "[email protected]"
git checkout -q main
git pull origin main
git add data/ README.md
git commit --allow-empty -m "Update data [skip ci]"
git push origin main