mirror of
https://github.com/beetbox/beets.git
synced 2026-01-07 16:34:45 +01:00
Add workflow
This commit is contained in:
parent
f984749cc6
commit
acc61e44a8
1 changed files with 29 additions and 0 deletions
29
.github/workflows/check_changelog.yaml
vendored
Normal file
29
.github/workflows/check_changelog.yaml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: Verify changelog updated
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- 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"
|
||||
exit 1
|
||||
else
|
||||
echo "Changelog modified or no .rst/.py files have been modified"
|
||||
fi
|
||||
Loading…
Reference in a new issue