Skip to content

update-changelog

update-changelog #34

# This workflow is triggered from other repositories in the Bucketeer Organization
# to update the CHANGELOG SDKs pages.
# In case of changes in the template (`update-changelog.sh`), we also might need to update the trigger side.
name: update-changelog
on:
workflow_dispatch:
inputs:
doc_filename:
description: "Doc filename"
type: string
required: true
doc_filepath:
description: "Doc filepath"
type: string
required: true
doc_title:
description: "Doc title"
type: string
required: true
doc_slug:
description: "Doc slug"
type: string
required: true
changelog_url:
description: "Changelog URL"
type: string
required: true
from_repository_name:
description: "From repository name"
type: string
required: true
from_repository_url:
description: "From repository URL"
type: string
required: true
commit_url:
description: "Commit URL"
type: string
required: true
release_tag:
description: "Release Tag"
type: string
required: true
jobs:
create-and-merge-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update the CHANGELOG.md file
env:
DOC_FILENAME: ${{ github.event.inputs.doc_filename }}
DOC_FILEPATH: ${{ github.event.inputs.doc_filepath }}
DOC_TITLE: ${{ github.event.inputs.doc_title }}
DOC_SLUG: ${{ github.event.inputs.doc_slug }}
CHANGELOG_URL: ${{ github.event.inputs.changelog_url }}
run: ./hack/update-changelog.sh
- name: Create the pull request
id: create-docs-pull-request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.ACTIONS_PAT }}
committer: bucketeer-bot <[email protected]>
author: bucketeer-bot <[email protected]>
commit-message: "docs: update ${{ github.event.inputs.doc_filename }} to ${{ github.event.inputs.release_tag }}"
title: "docs: update ${{ github.event.inputs.doc_filename }} changelog to ${{ github.event.inputs.release_tag }}"
body: "[${{ github.event.inputs.from_repository_name }}](${{ github.event.inputs.from_repository_url }}) commit: ${{ github.event.inputs.commit_url }}"
branch: "ci-docs-pr-${{ github.event.inputs.release_tag }}"
delete-branch: true
labels: automerge
- name: Merge the pull request
id: automerge
uses: pascalgn/automerge-action@7961b8b5eec56cc088c140b56d864285eabd3f67 # v0.16.4
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_PAT }}
PULL_REQUEST: ${{ steps.create-docs-pull-request.outputs.pull-request-number }}
MERGE_LABELS: automerge
MERGE_METHOD: squash
MERGE_ERROR_FAIL: true