-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (37 loc) · 1.21 KB
/
validate_schemas.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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@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