-
-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (27 loc) · 970 Bytes
/
check-changelog.yml
File metadata and controls
32 lines (27 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Check for CHANGELOG.md Update
permissions:
contents: read
on: []
# on: [pull_request]
jobs:
check-changelog:
if: false
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Get the list of modified files
id: changed-files
run: |
git fetch origin ${{ github.base_ref }} --depth=1
git diff --name-only origin/${{ github.base_ref }} ${{ github.sha }} > changed_files.txt
cat changed_files.txt
- name: Check if CHANGELOG.md was updated
run: |
if ! grep -q "^CHANGELOG.md$" changed_files.txt; then
echo "::error::CHANGELOG.md was not updated!"
exit 1
else
echo "CHANGELOG.md has been updated."
fi