mirror of https://github.com/grafana/grafana
[release-11.2.7] CI: Post-release process branch / PR migration (#100934)
* CI: Backport to release branches (#100067) * update backport and release comms * Backport to release branches and change docs source branch for publishing * Add new workflows to CODEOWNERS * Re-add removed line oops * backport-testing -> grafana * checkout grafana repo in backport action, reference repo / branch in reusable action * generate -> create (cherry picked from commitpull/101077/head6787cdccb9) * CI: Post-release process branch / PR migration (#100930) * update output for token in release-comms * use token from needs * generate token in individual workflows * Set secrets * define secrest in referenced workflows * wrong secret lol * oops * grafana/grafana -> grafana/grafana-enterprise (cherry picked from commit75189de4f7) * release-v -> release-
parent
902f4328c6
commit
d5cb50d4a4
@ -0,0 +1,53 @@ |
|||||||
|
name: Create next release branch |
||||||
|
on: |
||||||
|
workflow_call: |
||||||
|
inputs: |
||||||
|
ownerRepo: |
||||||
|
type: string |
||||||
|
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana') |
||||||
|
required: true |
||||||
|
source: |
||||||
|
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created) |
||||||
|
type: string |
||||||
|
required: true |
||||||
|
secrets: |
||||||
|
GRAFANA_DELIVERY_BOT_APP_ID: |
||||||
|
required: true |
||||||
|
GRAFANA_DELIVERY_BOT_APP_PEM: |
||||||
|
required: true |
||||||
|
outputs: |
||||||
|
branch: |
||||||
|
description: The new branch that was created |
||||||
|
value: ${{ jobs.main.outputs.branch }} |
||||||
|
workflow_dispatch: |
||||||
|
inputs: |
||||||
|
ownerRepo: |
||||||
|
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana') |
||||||
|
source: |
||||||
|
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created) |
||||||
|
type: string |
||||||
|
required: true |
||||||
|
secrets: |
||||||
|
GRAFANA_DELIVERY_BOT_APP_ID: |
||||||
|
required: true |
||||||
|
GRAFANA_DELIVERY_BOT_APP_PEM: |
||||||
|
required: true |
||||||
|
jobs: |
||||||
|
main: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
outputs: |
||||||
|
branch: ${{ steps.branch.outputs.branch }} |
||||||
|
steps: |
||||||
|
- name: "Generate token" |
||||||
|
id: generate_token |
||||||
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 |
||||||
|
with: |
||||||
|
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }} |
||||||
|
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }} |
||||||
|
- name: Create release branch |
||||||
|
id: branch |
||||||
|
uses: grafana/grafana-github-actions-go/bump-release@main |
||||||
|
with: |
||||||
|
ownerRepo: ${{ inputs.ownerRepo }} |
||||||
|
source: ${{ inputs.source }} |
||||||
|
token: ${{ steps.generate_token.outputs.token }} |
||||||
@ -0,0 +1,60 @@ |
|||||||
|
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 |
||||||
|
secrets: |
||||||
|
GRAFANA_DELIVERY_BOT_APP_ID: |
||||||
|
required: true |
||||||
|
GRAFANA_DELIVERY_BOT_APP_PEM: |
||||||
|
required: true |
||||||
|
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 |
||||||
|
secrets: |
||||||
|
GRAFANA_DELIVERY_BOT_APP_ID: |
||||||
|
required: true |
||||||
|
GRAFANA_DELIVERY_BOT_APP_PEM: |
||||||
|
required: true |
||||||
|
|
||||||
|
jobs: |
||||||
|
main: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- name: "Generate token" |
||||||
|
id: generate_token |
||||||
|
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 |
||||||
|
with: |
||||||
|
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }} |
||||||
|
private_key: ${{ secrets.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' |
||||||
Loading…
Reference in new issue