chore: Ignore dependabot on forks (#8431)

* Ignore dependabot on forks

* Apply suggestions from code review

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
Yishuai Li
2022-02-01 01:16:08 +08:00
committed by GitHub
co-authored by Tony
parent 81cd715ed0
commit eb344ea667
+17
View File
@@ -0,0 +1,17 @@
---
on: pull_request
jobs:
dependabot-fork:
runs-on: ubuntu-latest
name: Ignore dependabot on forks
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Comment Dependabot PR
if: github.repository_owner != 'DIYgod' && github.actor == 'dependabot[bot]'
uses: thollander/actions-comment-pull-request@v1
with:
message: '@dependabot ignore this dependency'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}