From fc4453e87244ac06d9178dc12b7d4aa4a0632368 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:09:31 +0300 Subject: [PATCH] [v10.4.x] CI: changelog boolean type (#90954) 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 14396048d7bc736a107293a513cf33c676284682) Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com> --- .github/workflows/changelog.yml | 19 ++++++++----------- .github/workflows/release-pr.yml | 13 +++---------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index c63b8c54261..6a012b83634 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -3,6 +3,7 @@ on: workflow_call: inputs: version: + type: string required: true description: 'Target release version (semver, git tag, branch or commit)' target: @@ -12,14 +13,15 @@ on: dry_run: required: false default: false - type: bool + type: boolean latest: required: false default: false - type: bool + type: boolean workflow_dispatch: inputs: version: + type: string required: true description: 'Target release version (semver, git tag, branch or commit)' target: @@ -29,13 +31,14 @@ on: dry_run: required: false default: false - type: bool + type: boolean latest: required: false default: false - type: bool + type: boolean permissions: + contents: write pull-requests: write jobs: @@ -44,12 +47,6 @@ jobs: permissions: contents: write 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" uses: "actions/checkout@v4" with: @@ -69,7 +66,7 @@ jobs: id: changelog uses: ./.github/workflows/actions/changelog with: - github_token: ${{ steps.generate_token.outputs.token }} + github_token: ${{ secrets.GITHUB_TOKEN }} target: v${{ inputs.version }} output_file: changelog_items.md - name: "Patch CHANGELOG.md" diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 500424de978..68d89c452ba 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -23,11 +23,11 @@ on: dry_run: required: false default: false - type: bool + type: boolean latest: required: false default: false - type: bool + type: boolean permissions: contents: write @@ -47,13 +47,6 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'grafana/grafana' 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 uses: actions/checkout@v4 with: @@ -73,7 +66,7 @@ jobs: id: changelog uses: ./.github/workflows/actions/changelog with: - github_token: ${{ steps.generate_token.outputs.token }} + github_token: ${{ secrets.GITHUB_TOKEN }} target: v${{ inputs.version }} output_file: changelog_items.md