* baldm0mma/ update to use vault * baldm0mma/ rem zizmor comm * Update .github/workflows/migrate-prs.yml Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com> * Update .github/workflows/migrate-prs.yml Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com> --------- Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
name: Migrate open PRs
|
|
# Migrate open PRs from a superseded release branch to the current release branch and notify authors
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
from:
|
|
description: 'The base branch to check for open PRs'
|
|
required: true
|
|
type: string
|
|
to:
|
|
description: 'The base branch to migrate open PRs to'
|
|
required: true
|
|
type: string
|
|
ownerRepo:
|
|
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
|
required: true
|
|
type: string
|
|
workflow_dispatch:
|
|
inputs:
|
|
from:
|
|
description: 'The base branch to check for open PRs'
|
|
required: true
|
|
type: string
|
|
to:
|
|
description: 'The base branch to migrate open PRs to'
|
|
required: true
|
|
type: string
|
|
ownerRepo:
|
|
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
main:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Get vault secrets"
|
|
id: vault-secrets
|
|
uses: grafana/shared-workflows/actions/get-vault-secrets@main
|
|
with:
|
|
# Secrets placed in the ci/data/repo/grafana/grafana/delivery-bot-app path in Vault
|
|
repo_secrets: |
|
|
GRAFANA_DELIVERY_BOT_APP_PEM=delivery-bot-app:PRIVATE_KEY
|
|
- name: "Generate token"
|
|
id: generate_token
|
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
|
with:
|
|
app_id: ${{ vars.DELIVERY_BOT_APP_ID }}
|
|
private_key: ${{ env.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
|
- name: Migrate PRs
|
|
uses: grafana/grafana-github-actions-go/migrate-open-prs@main
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
ownerRepo: ${{ inputs.ownerRepo }}
|
|
from: ${{ inputs.from }}
|
|
to: ${{ inputs.to }}
|
|
binary_release_tag: 'dev'
|