Skip to content

Commit

Permalink
Added the sample.json validation action
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloPia committed Jan 15, 2024
1 parent 1c90bda commit 7f51ffe
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/validate-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@ jobs:
# Find all sample.json files in the pull request
files=$(git diff --name-only | grep 'sample.json$')
echo "Found sample.json files: $files"
# Process each file
for file in $files; do
echo "Processing file: $file"
response=$(curl -X POST -H "Content-Type: application/json" -d @$file https://m365-galleries.azurewebsites.net/Samples/validateSample)
echo "Response: $response"

isValid=$(echo "$response" | jq -r '.isValid')
if [[ $isValid == "true" ]]; then
echo "Validation successful for $file"
else
echo "Validation failed for $file! Please fix the errors and try again."
exit 1
fi
done
id: fetch
failure:
needs: validate
Expand Down

0 comments on commit 7f51ffe

Please sign in to comment.