Skip to content

Commit

Permalink
Document how to skip bot accounts entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu authored Aug 18, 2022
1 parent 4fdf438 commit 0587861
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ on:
jobs:
sponsor:
runs-on: ubuntu-latest
if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2

- name: ❤️ sponsor
uses: devlooped/actions-sponsor@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GH_TOKEN }}
```
> NOTE: you will typically want to skip running the workflow at all for bot accounts, hence the `if` above.

Full example overriding all values (and running on *all* issue/PR events):

```yml
Expand All @@ -68,6 +71,7 @@ on: [issues, pull_request]
jobs:
sponsor:
runs-on: ubuntu-latest
if: ${{ !endsWith(github.event.sender.login, '[bot]') && !endsWith(github.event.sender.login, 'bot') }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
Expand Down

0 comments on commit 0587861

Please sign in to comment.