File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check for CHANGELOG.md Update
2
+
3
+ permissions :
4
+ contents : read
5
+
6
+ on : [pull_request]
7
+
8
+ jobs :
9
+ check-changelog :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Check out the repository
13
+ uses : actions/checkout@v3
14
+
15
+ - name : Get the list of modified files
16
+ id : changed-files
17
+ run : |
18
+ git fetch origin ${{ github.base_ref }} --depth=1
19
+ git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }} > changed_files.txt
20
+ cat changed_files.txt
21
+
22
+ - name : Check if CHANGELOG.md was updated
23
+ run : |
24
+ if ! grep -q "^CHANGELOG.md$" changed_files.txt; then
25
+ echo "::error::CHANGELOG.md was not updated!"
26
+ exit 1
27
+ else
28
+ echo "CHANGELOG.md has been updated."
29
+ fi
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
8
8
9
9
- added documentation for color assignments in ` CONTRIBUTING.md ` to standardize the use of color variables in bash scripts
10
10
- added detailed color definitions and a usage example in the new "Color Assignments" section
11
+ - added Github Action to check if Pull Request contains ` CHANGELOG.md ` updates
11
12
12
13
---
13
14
You can’t perform that action at this time.
0 commit comments