-
Notifications
You must be signed in to change notification settings - Fork 569
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the app token in backport.yml (#10820)
- Loading branch information
1 parent
f83f20b
commit b02d42c
Showing
1 changed file
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,36 @@ | ||
name: Backport PR Creator | ||
|
||
on: | ||
pull_request_target: | ||
pull_request: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Retrieve GitHub App credentials from Vault | ||
id: get-secrets | ||
uses: grafana/shared-workflows/actions/[email protected] | ||
with: | ||
repo_secrets: | | ||
APP_ID=mimir-github-bot:app_id | ||
PRIVATE_KEY=mimir-github-bot:private_key | ||
- name: Generate GitHub App token | ||
id: app-token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ env.APP_ID }} | ||
private-key: ${{ env.PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} | ||
|
||
- name: Checkout Actions | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -17,11 +39,13 @@ jobs: | |
# pin the version to before https://github.com/grafana/grafana-github-actions/pull/113 because | ||
# we don't want to have the same strict rules for PR labels | ||
ref: d284afd314ca3625c23595e9f62b52d215ead7ce | ||
|
||
- name: Install Actions | ||
run: npm install --production --prefix ./actions | ||
|
||
- name: Run backport | ||
uses: ./actions/backport | ||
with: | ||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}} | ||
token: ${{ steps.app-token.outputs.token }} | ||
labelsToAdd: "backport" | ||
title: "[{{base}}] {{originalTitle}}" |