-
Notifications
You must be signed in to change notification settings - Fork 102
52 lines (46 loc) · 1.32 KB
/
metadata-validation.yml
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
46
47
48
49
50
51
52
name: Metadata Validation Pattern Submission Workflow
on:
push:
paths:
- "python-test-samples/**"
- "dotnet-test-samples/**"
- "typescript-test-samples/**"
- "java-test-samples/**"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Stockopedia/action-get-changed-files@v1
id: get_changed
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ignore: "**/+(.github)"
foldersOnly: false
format: csv
- name: Echo changed files
id: setfiles
run: |
files=${{ steps.get_changed.outputs.changed }}
echo $files
echo "FILES=$files" >> $GITHUB_OUTPUT
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Get new folder
id: setfolders
run: |
python -m pip install --upgrade pip
pip install github-action-utils
python .github/workflows/getPatternFolder.py "${{ steps.setfiles.outputs.FILES }}"
- name: Validate Schema
run: |
for folder in ${{ steps.setfolders.outputs.folders }}
do
echo $folder
pip install -r .github/workflows/requirements.txt
python .github/workflows/metadata_json_validator.py $folder
done