Skip to content

Update CHANGELOG.md #60

Update CHANGELOG.md

Update CHANGELOG.md #60

name: Update schemas with changes
on:
push:
branches-ignore: ["main"]
jobs:
update-schemas-with-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Get complete history
- name: Get latest push changes
id: changed-files
# if: github.base_ref != 'main' && github.event.action == 'synchronize'
uses: tj-actions/changed-files@v44
with:
since_last_remote_commit: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
echo "$file was changed"
done
- name: Install dependencies
run: pip install git+https://github.com/hed-standard/hed-python.git@develop
- name: Update schemas
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
hed_update_schemas $ALL_CHANGED_FILES
- name: Push schema changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "Automated schema changes"
git push
fi