Skip to content

Trigger renovate bot on pull_request_target events instead of pull_request events to get around fork errors #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,8 @@ on:
concurrency: ci-${{ github.ref }}

jobs:
renovate-bot:
runs-on: ubuntu-latest
steps:
- uses: P5-wrapper/setup-action@v1.0.5
with:
token: ${{ secrets.GH_TOKEN }}

- name: Run format if the PR is from the Renovate bot
if: github.actor == 'renovate[bot]'
run: pnpm format
shell: bash

- name: Commit any formatting changes
if: github.actor == 'renovate[bot]'
uses: stefanzweifel/git-auto-commit-action@v4.16.0
with:
commit_message: Apply formatting updates
branch: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}

format:
runs-on: ubuntu-latest
needs: renovate-bot
steps:
- uses: P5-wrapper/setup-action@v1.0.5
with:
Expand All @@ -50,7 +29,6 @@ jobs:

lint:
runs-on: ubuntu-latest
needs: renovate-bot
steps:
- uses: P5-wrapper/setup-action@v1.0.5
with:
Expand All @@ -71,7 +49,6 @@ jobs:

test:
runs-on: ubuntu-latest
needs: renovate-bot
steps:
- uses: P5-wrapper/setup-action@v1.0.5
with:
Expand All @@ -82,7 +59,6 @@ jobs:

build:
runs-on: ubuntu-latest
needs: renovate-bot
steps:
- uses: P5-wrapper/setup-action@v1.0.5
with:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/RenovateBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Renovate Bot

on:
pull_request_target:
branches: [master]

jobs:
renovate-bot:
runs-on: ubuntu-latest
steps:
- uses: P5-wrapper/setup-action@v1.0.4
with:
token: ${{ secrets.GH_TOKEN }}

- name: Run format if the PR is from the Renovate bot
if: github.actor == 'renovate[bot]'
run: pnpm format
shell: bash

- name: Commit any formatting changes
if: github.actor == 'renovate[bot]'
uses: stefanzweifel/git-auto-commit-action@v4.16.0
with:
commit_message: Apply formatting updates
branch: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
Loading