metrics #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |