Collect contributors #68
This file contains hidden or 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: Collect contributors | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 8 * * 1' | |
| jobs: | |
| run-r-script: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | | |
| gh | |
| allcontributors | |
| - name: Collect contributor data | |
| run: Rscript -e 'allcontributors::add_contributors(repo = ".", files = c("about.qmd", "README.md"), num_sections = 1)' | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| commit-message: "Update contributors" | |
| branch: update-contributors | |
| title: "Update contributors" | |
| body: "This PR updates the contributors list." | |
| labels: "auto-update" | |
| add-paths: | | |
| README.md | |
| about.qmd |