Skip to content

Commit

Permalink
Add changelog check
Browse files Browse the repository at this point in the history
Signed-off-by: Aiden <[email protected]>
  • Loading branch information
aidenbok203 authored Nov 27, 2024
1 parent 98e1ca6 commit 9993a24
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/checkChangelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check changelog has been updated

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
changelog-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Fetch all branches
run: git fetch --all

- name: Check if changelog has been updated
run: |
if ! git diff --name-only origin/main...HEAD | grep -q '^\.github/CHANGELOG\.md$'; then
echo "Changelog not updated. Please update .github/CHANGELOG.md" >&2
exit 1
fi
- name: Notify success
if: success()
run: echo "Changelog has been updated."

0 comments on commit 9993a24

Please sign in to comment.