Skip to content

Commit 78fec66

Browse files
committed
CI: check if CHANGES file was edited
1 parent 122adba commit 78fec66

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/main.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,27 @@ jobs:
5757
with:
5858
name: html-docs
5959
path: _build/default/_doc/_html/
60+
61+
check-changes:
62+
runs-on: ubuntu-latest
63+
if: github.event_name == 'pull_request'
64+
steps:
65+
- name: Checkout code
66+
uses: actions/checkout@v4
67+
with:
68+
fetch-depth: 0
69+
70+
- name: Determine if CHANGES changed
71+
id: changes-changed
72+
uses: tj-actions/changed-files@v39
73+
with:
74+
files_yaml: |
75+
changes:
76+
- 'CHANGES'
77+
78+
- name: Fail if CHANGES did not change
79+
if: steps.changes-changed.outputs.changes_any_changed == 'false'
80+
run: |
81+
echo "No changes made to the CHANGES file."
82+
echo "Please update the file with your changes."
83+
exit 1

0 commit comments

Comments
 (0)