mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
CI: For every release PR created, also push a changelog PR to main (#90698)
For every release PR created, also push a changelog PR to main
This commit is contained in:
parent
a0268a9ad2
commit
9232db2416
20
.github/workflows/changelog.yml
vendored
20
.github/workflows/changelog.yml
vendored
@ -1,5 +1,22 @@
|
||||
name: Generate changelog
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: 'Target release version (semver, git tag, branch or commit)'
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: 'The base branch that these changes are being merged into'
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: bool
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: bool
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
@ -84,8 +101,9 @@ jobs:
|
||||
fi
|
||||
|
||||
git diff CHANGELOG.md
|
||||
git add CHANGELOG.md
|
||||
- name: "Commit changelog changes"
|
||||
run: git commit --allow-empty -m "Update changelog placeholder" CHANGELOG.md
|
||||
run: git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
- name: "git push"
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push
|
||||
|
9
.github/workflows/release-comms.yml
vendored
9
.github/workflows/release-comms.yml
vendored
@ -58,18 +58,13 @@ jobs:
|
||||
echo dry run: ${{ needs.setup.outputs.dry_run }}
|
||||
create_github_release:
|
||||
# a github release requires a git tag
|
||||
# The github-release action retrieves the changelog using the /repos/grafana/grafana/contents/CHANGELOG.md API
|
||||
# endpoint.
|
||||
needs: setup
|
||||
uses: ./.github/workflows/github-release.yml
|
||||
with:
|
||||
version: ${{ needs.setup.outputs.version }}
|
||||
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
|
||||
publish_docs:
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
echo publish docs for ${{ needs.setup.outputs.version }}
|
||||
echo dry run: ${{ needs.setup.outputs.dry_run }}
|
||||
post_on_slack:
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
|
9
.github/workflows/release-pr.yml
vendored
9
.github/workflows/release-pr.yml
vendored
@ -34,12 +34,19 @@ permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
push-changelog-to-main:
|
||||
name: Create PR to main to update the changelog
|
||||
uses: ./.github/workflows/changelog.yml
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
target: main
|
||||
create-prs:
|
||||
name: Create Release PR
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
steps:
|
||||
|
||||
- name: Generate bot token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
|
Loading…
Reference in New Issue
Block a user