Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the change file versions #265

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 57 additions & 57 deletions .github/workflows/update_and_convert_schemas.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
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 'actions@github.com'
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "Automated schema changes"
git push
fi

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@v45
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 'actions@github.com'
git add .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "Automated schema changes"
git push
fi
90 changes: 45 additions & 45 deletions .github/workflows/validate_schemas.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: Validate schemas

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

jobs:
validate-schemas:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true

- 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: Run command on file list
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
hed_validate_schemas $ALL_CHANGED_FILES
name: Validate schemas
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
validate-schemas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true
- 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: Run command on file list
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
hed_validate_schemas $ALL_CHANGED_FILES
2 changes: 1 addition & 1 deletion .github/workflows/verify_source_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Get latest push changes
id: changed-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: true

Expand Down