Update sponsors #286
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: Update sponsors | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 30 2 * * * # Run every day at 2:30am | |
jobs: | |
update_sponsors: | |
name: Add all sponsors to README | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
with: | |
fetch-depth: '0' | |
- name: Generate sponsors list | |
uses: JamesIves/github-sponsors-readme-action@v1 | |
with: | |
token: ${{ secrets.AC_PAT }} | |
file: 'README.md' | |
template: '<a href="https://github.com/{{{ login }}}"><img src="https://github.com/{{{ login }}}.png" width="80px" alt="{{{ login }}}" /></a> ' | |
marker: 'github-sponsors' | |
active-only: false | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
add-paths: | | |
README.md | |
commit-message: 'docs(README): update sponsors' | |
branch: 'automated/update-sponsors' | |
delete-branch: true | |
title: 'docs(README): update sponsors' | |
body: 'This pull request updates the list of sponsors in the README.' | |
assignees: 'nwithan8' | |
labels: | | |
Automated PR | |
- name: Display pull request information | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.AC_PAT }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash |