From 017c378582cca20688acac171bab803597d825b4 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Thu, 8 Aug 2024 22:02:36 +0200 Subject: [PATCH] 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 --- .github/workflows/renovate-automatic-approval.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/renovate-automatic-approval.yml b/.github/workflows/renovate-automatic-approval.yml index 1185fd800..ee84a2263 100644 --- a/.github/workflows/renovate-automatic-approval.yml +++ b/.github/workflows/renovate-automatic-approval.yml @@ -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"