only run CHANGELOG check when source files are modified
@@ -36,7 +36,12 @@ jobs:
steps:
- uses: actions/checkout@v1
+ - name: Check if source files have changed
+ run: |
+ git diff --name-only $(git merge-base origin/main HEAD) | grep '^allennlp/.*\.py$' && echo "source_files_changed=true" >> $GITHUB_ENV || echo "source_files_changed=false" >> $GITHUB_ENV
+
- name: Check that CHANGELOG has been updated
+ if: env.source_files_changed == 'true'
run: |
# If this step fails, this means you haven't updated the CHANGELOG.md
# file with notes on your contribution.
