mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 04:52:49 +01:00
Use different method for calculating changed paths
This commit is contained in:
parent
acc61e44a8
commit
8e815049fa
1 changed files with 10 additions and 6 deletions
16
.github/workflows/check_changelog.yaml
vendored
16
.github/workflows/check_changelog.yaml
vendored
|
|
@ -1,6 +1,15 @@
|
|||
name: Verify changelog updated
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.rst'
|
||||
- '**.py'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.rst'
|
||||
- '**.py'
|
||||
|
||||
|
||||
jobs:
|
||||
check:
|
||||
|
|
@ -14,12 +23,7 @@ jobs:
|
|||
|
||||
- name: Check for Change Log Modification
|
||||
run: |
|
||||
changed_files=$(git diff --name-only HEAD~1..HEAD)
|
||||
|
||||
changelog_modified=$(echo "$changed_files" | grep '^CHANGELOG.rst$' || true)
|
||||
|
||||
python_or_rst_modified=$(echo "$changed_files" | grep '.*\.\(rst\|py\)$' || true)
|
||||
|
||||
if [ -z "$changelog_modified" ] && [ ! -z "$python_or_rst_modified" ]
|
||||
then
|
||||
echo "Error: Changelog not modified while .rst or .py files have been modified"
|
||||
|
|
|
|||
Loading…
Reference in a new issue