Skip to content

Commit

Permalink
Adds action to update README on new backer (#2900)
Browse files Browse the repository at this point in the history
* Adds action to update README on new backer

* Updated readme commit action

* Updated workflow to be triggered manually
  • Loading branch information
ptoffy committed Oct 27, 2022
1 parent 43fc875 commit a4d8bb2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/sponsors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Generate Sponsors README
on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Generate Sponsors
uses: JamesIves/github-sponsors-readme-action@v1
with:
token: ${{ secrets.SPONSORS_PAT }}
file: "README.md"
minimum: 500
maximum: 9900
marker: "backers"
organization: true

# Here we can eventually add sponsors too rather than just backers

- name: Commit changes
run: |
git config --global user.email "bot@vapor.codes"
git config --global user.name "VaporBot"
git config --global credential.helper cache
git add README.md
git diff-index --quiet HEAD || git commit -m "Automatic update of README.md after new sponsor joined"
git push https://VaporBot:${{secrets.SPONSORS_PAT}}@github.com/vapor/vapor main
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Support Vapor's development by [becoming a sponsor](https://github.com/sponsors/
### 💚 Backers
Support Vapor's development by [becoming a backer](https://github.com/sponsors/vapor).

<!-- backers -->

<a
data-amt="50"
data-since="10/09/20"
Expand Down Expand Up @@ -437,6 +439,8 @@ Support Vapor's development by [becoming a backer](https://github.com/sponsors/v
<img src="https://avatars.githubusercontent.com/u/1652009?s=120" width="60px">
</a>

<!-- backers -->

<a href="https://opencollective.com/vapor/backer/0/website" target="_blank"><img src="https://opencollective.com/vapor/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/vapor/backer/1/website" target="_blank"><img src="https://opencollective.com/vapor/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/vapor/backer/2/website" target="_blank"><img src="https://opencollective.com/vapor/backer/2/avatar.svg"></a>
Expand Down

0 comments on commit a4d8bb2

Please sign in to comment.