Skip to content

Commit a7f7c93

Browse files
committed
Update validation workflow.
Signed-off-by: alyssacgoins <[email protected]>
1 parent 85a7e89 commit a7f7c93

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/validate-component-metadata-schema.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: validate-metadata-schema
22
env:
33
PYTHON_VERSION: "3.11"
44
TARGET_DIR: "component/pipelines"
5+
COMPONENT_TYPES: "data_processing,deployment,evaluation,training"
56
on:
67
pull_request:
78
paths:
@@ -60,13 +61,14 @@ jobs:
6061
ALL_NEW_PATHS=$(git diff --name-only --diff-filter=A $COMMIT_RANGE -- "components")
6162
6263
# 2. Process the list to extract new components.
63-
NEW_COMPONENTS=$(echo "$ALL_NEW_PATHS" | \
64-
# Filter for files that are directly in components/
65-
grep -E "components.+/" | \
66-
sed 's/^components\///' | \
67-
sort -u | \
68-
tr '\n' ',' | \
69-
sed 's/,$//')
64+
for type in "$COMPONENT_TYPES"; do
65+
NEW_COMPONENTS+=$(echo "$ALL_NEW_PATHS" | \
66+
# Filter for files that are directly in components/
67+
grep -E "components/$type.+/" | \
68+
sed 's/^components\///' | \
69+
sort -u | \
70+
tr '\n' ',' | \
71+
sed 's/,$//')
7072
7173
# --- Output ---
7274
echo "The following new components were found and will be validated: $NEW_COMPONENTS"

0 commit comments

Comments
 (0)