Skip to content

Commit 218de60

Browse files
authored
feat(ci): changelog validation (#724)
1 parent 851f0ee commit 218de60

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2025 NVIDIA CORPORATION
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Validate Changelog
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, labeled, unlabeled]
9+
branches:
10+
- main
11+
- 'v*.*'
12+
13+
jobs:
14+
validate-changelog:
15+
name: Validate Changelog
16+
runs-on: ubuntu-latest
17+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Check CHANGELOG.md updated
24+
run: |
25+
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q '^CHANGELOG.md$'; then
26+
echo "CHANGELOG.md has been updated."
27+
else
28+
echo "::error::CHANGELOG.md has not been updated. Please update the changelog or add the 'skip-changelog' label to opt out."
29+
exit 1
30+
fi
31+

0 commit comments

Comments
 (0)