-
-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (48 loc) · 1.79 KB
/
sponsors.yml
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
46
47
48
49
50
51
52
53
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