Skip to content

Commit

Permalink
MetalLB bump automation: use appid / private key to generate the token
Browse files Browse the repository at this point in the history
Currently, PRs filed by the automation does not run CI. This requires
some leap of faith in order to merge them.
As per peter-evans/create-pull-request#48
and https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens

using a github app token should make the trick.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
  • Loading branch information
fedepaol committed Feb 13, 2024
1 parent f292b0e commit 9e18cde
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/bump_metallb.yml
Expand Up @@ -51,18 +51,23 @@ jobs:
- name: Bump metallb
if: ${{ steps.check-for-changes.outputs.has_changes == 'true' }}
run: make bump_metallb
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.AUTO_BUMP_APP_ID }}
private_key: ${{ secrets.AUTO_BUMP_APP_PRIVATE_KEY }}
- name: Create pull request
if: ${{ steps.check-for-changes.outputs.has_changes == 'true'}}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
commit-message: |
Bump MetalLB
This commit bumps MetalLB:
from: ${{ steps.old-metallb.outputs.commit_sha }}
${{ steps.old-commit-info.outputs.commit_title }} (${{ steps.old-commit-info.outputs.commit_date }})
to: ${{ steps.new-commit-info.outputs.commit_sha }}
${{ steps.new-commit-info.outputs.commit_title }} (${{ steps.new-commit-info.outputs.commit_date }})
author: github-actions[bot] <noreply@github.com>
Expand All @@ -72,4 +77,3 @@ jobs:
branch: "bumpmetallb"
delete-branch: true
base: "main"

0 comments on commit 9e18cde

Please sign in to comment.