Reusable GitHub Actions workflow that enforces the chloggen-style changelog process on pull requests: CHANGELOG*.md files must not be edited directly, a .chloggen/*.yaml entry must be added instead, that entry must pass make chlog-validate, and any links in its rendered preview are checked with lychee.
Replace your repository's inline changelog workflow (typically .github/workflows/changelog.yml) with something like:
name: Changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions: {}
jobs:
changelog:
permissions:
contents: read
pull-requests: read
uses: open-telemetry/shared-workflows/.github/workflows/chloggen.yml@<sha-or-tag>Pin <sha-or-tag> to a commit SHA or release tag in this repository. No secrets are required.
Keep your repository's own on: trigger, concurrency:, and permissions: blocks — those stay in the calling workflow, since a reusable workflow cannot define when it runs.
Your repository must have:
- A
.chloggen/directory with a config the chloggen tool understands. make chlog-validateandmake chlog-previewtargets that invoke chloggen.- A
.github/lychee.tomlfor the link-check step.
go-versionis passed straight toactions/setup-goand defaults tooldstable. Set it if your repository'schloggenbuild needs a specific Go version.skip-title-markeris the substring in the pull request title that skips changelog enforcement, and defaults to[chore]. Set it to an empty string to disable title-based skipping entirely.skip-labelsis a comma-separated list of pull request labels that skip changelog enforcement, and defaults todependencies,Skip Changelog. Set it to an empty string to disable label-based skipping entirely.skip-actorsis a comma-separated list of actors for which the entire job is skipped, and defaults todependabot[bot],renovate[bot]. Set it to an empty string to disable actor-based skipping entirely.
Example overriding every input:
jobs:
changelog:
permissions:
contents: read
pull-requests: read
uses: open-telemetry/shared-workflows/.github/workflows/chloggen.yml@<sha-or-tag>
with:
go-version: '1.23'
skip-title-marker: '[skip changelog]'
skip-labels: 'dependencies,Skip Changelog,internal'
skip-actors: 'dependabot[bot],renovate[bot],otelbot[bot]'A pull request skips every check in this workflow (other than the job itself running) when either of these is true:
- It has one of the labels in the
skip-labelsinput (dependenciesorSkip Changelogby default). - Its title contains the
skip-title-markerinput's value ([chore]by default).
The job itself is always skipped when the triggering actor is in the skip-actors input (dependabot[bot] or renovate[bot] by default).