fix: renovate approval run for all pull requests on every pull request change (#942)

* fix: renovate approval run for all pull requests on every pull request change

* fix: run approval only for renovate branches

* fix: restrict actor to renovate bot
This commit is contained in:
Meier Lukas
2024-08-08 22:02:36 +02:00
committed by GitHub
parent a80b49a03e
commit 017c378582

View File

@@ -2,10 +2,13 @@ name: "[Dependency Updates] Auto Approve"
on:
pull_request:
types: [opened, synchronize]
branches:
- "renovate/**"
jobs:
approve-renovate-prs:
runs-on: ubuntu-latest
if: github.actor == 'homarr-renovate[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -21,6 +24,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
run: |
for pr in $(gh pr list --author homarr-renovate[bot] --json number --jq .[].number); do
gh pr review $pr --approve --body "Automatically approved by GitHub Action"
done
gh pr review ${{github.event.pull_request.number}} --approve --body "Automatically approved by GitHub Action"