Skip to content

Commit

Permalink
ci: use app instead of personal token (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-rw committed Jun 6, 2024
1 parent cfd8b32 commit 251cedf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/renovate-automatic-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ on:
jobs:
approve-renovate-prs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Obtain token
id: obtainToken
uses: tibdex/github-app-token@v2
with:
private_key: ${{ secrets.RENOVATE_APPROVE_PRIVATE_KEY }}
app_id: ${{ secrets.RENOVATE_APPROVE_APP_ID }}
- name: Install GitHub CLI
run: sudo apt-get install -y gh

- name: Approve Renovate PRs
env:
GITHUB_TOKEN: ${{ secrets.RENOVATE_APPROVE_TOKEN }}
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"
Expand Down

0 comments on commit 251cedf

Please sign in to comment.