Skip to content

Commit

Permalink
Add action for checking changelog updates (#1358)
Browse files Browse the repository at this point in the history
Adds a GH action that ensures `CHANGELOG.md` is updated with each PR,
unless the PR is labelled `skip_changelog`

Resolves #1340
  • Loading branch information
f0uriest authored Nov 13, 2024
2 parents f83b8dd + e6177b6 commit a880816
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/changelog_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check changelog updated

on:
pull_request:
branches:
- master
types: [opened, synchronize, labeled, unlabeled]

jobs:
check_changelog_updated:
runs-on: ubuntu-latest
steps:
- name: Filter changes
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
has_changes:
- 'desc/**'
- 'requirements.txt'
- 'requirements_conda.yml'
- '.github/workflows/changelog_update.yml'
- name: Check for relevant changes
id: check_changes
run: echo "has_changes=${{ steps.changes.outputs.has_changes }}" >> $GITHUB_ENV

- uses: actions/checkout@v4

- if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip_changelog') && env.has_changes == 'true'}}
uses: danieljimeneznz/[email protected]
with:
require-changes-to: |
CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a880816

Please sign in to comment.