[v11.1.x] CI: changelog boolean type (#90956)

CI: changelog boolean type (#90948)

* bool -> boolean

* add missing type keys

* provide secrets in release-pr

* use permissions and built-in github token

(cherry picked from commit 14396048d7)

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-07-25 18:10:17 +03:00
committed by GitHub
co-authored by Kevin Minehart
parent c17f395374
commit 8a219d5d18
2 changed files with 11 additions and 21 deletions
+8 -11
View File
@@ -3,6 +3,7 @@ on:
workflow_call: workflow_call:
inputs: inputs:
version: version:
type: string
required: true required: true
description: 'Target release version (semver, git tag, branch or commit)' description: 'Target release version (semver, git tag, branch or commit)'
target: target:
@@ -12,14 +13,15 @@ on:
dry_run: dry_run:
required: false required: false
default: false default: false
type: bool type: boolean
latest: latest:
required: false required: false
default: false default: false
type: bool type: boolean
workflow_dispatch: workflow_dispatch:
inputs: inputs:
version: version:
type: string
required: true required: true
description: 'Target release version (semver, git tag, branch or commit)' description: 'Target release version (semver, git tag, branch or commit)'
target: target:
@@ -29,13 +31,14 @@ on:
dry_run: dry_run:
required: false required: false
default: false default: false
type: bool type: boolean
latest: latest:
required: false required: false
default: false default: false
type: bool type: boolean
permissions: permissions:
contents: write
pull-requests: write pull-requests: write
jobs: jobs:
@@ -44,12 +47,6 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: 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: "Checkout Grafana repo" - name: "Checkout Grafana repo"
uses: "actions/checkout@v4" uses: "actions/checkout@v4"
with: with:
@@ -69,7 +66,7 @@ jobs:
id: changelog id: changelog
uses: ./.github/workflows/actions/changelog uses: ./.github/workflows/actions/changelog
with: with:
github_token: ${{ steps.generate_token.outputs.token }} github_token: ${{ secrets.GITHUB_TOKEN }}
target: v${{ inputs.version }} target: v${{ inputs.version }}
output_file: changelog_items.md output_file: changelog_items.md
- name: "Patch CHANGELOG.md" - name: "Patch CHANGELOG.md"
+3 -10
View File
@@ -23,11 +23,11 @@ on:
dry_run: dry_run:
required: false required: false
default: false default: false
type: bool type: boolean
latest: latest:
required: false required: false
default: false default: false
type: bool type: boolean
permissions: permissions:
contents: write contents: write
@@ -47,13 +47,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'grafana/grafana' if: github.repository == 'grafana/grafana'
steps: steps:
- name: Generate bot 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: Checkout Grafana - name: Checkout Grafana
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -73,7 +66,7 @@ jobs:
id: changelog id: changelog
uses: ./.github/workflows/actions/changelog uses: ./.github/workflows/actions/changelog
with: with:
github_token: ${{ steps.generate_token.outputs.token }} github_token: ${{ secrets.GITHUB_TOKEN }}
target: v${{ inputs.version }} target: v${{ inputs.version }}
output_file: changelog_items.md output_file: changelog_items.md