-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add a check for changelog updates on PR to v1/v1-next
- Loading branch information
1 parent
934a283
commit 1421a2b
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Changelog Check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- v1 | ||
- v1-next | ||
|
||
jobs: | ||
check_changelog: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check for updated CHANGELOG.md | ||
run: | | ||
git fetch origin ${{ github.event.pull_request.base.ref }} | ||
if git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD | grep -q 'CHANGELOG.md'; then | ||
echo "CHANGELOG.md has been updated." | ||
else | ||
echo "CHANGELOG.md has not been updated." | ||
exit 1 | ||
fi |