Fix 'Check Toolkits' Workflow (#197)
# PR Description The 'Check Toolkits' workflow was failing if no toolkits were changed. This PR gracefully exits the workflow for this case.
This commit is contained in:
parent
22f2422aff
commit
4098cb8464
1 changed files with 8 additions and 4 deletions
12
.github/workflows/check-toolkits.yml
vendored
12
.github/workflows/check-toolkits.yml
vendored
|
|
@ -32,7 +32,11 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||
run: |
|
||||
dirs=$(echo "${CHANGED_FILES}" | tr ' ' '\n' | grep "toolkits/" | cut -d'/' -f2 | sort -u)
|
||||
echo "$dirs" | while read -r dir; do
|
||||
echo "$dir"
|
||||
gh workflow -R ArcadeAI/arcade-ai run "Publish Toolkit" -f toolkit=${dir}
|
||||
done
|
||||
if [ -n "$dirs" ]; then
|
||||
echo "$dirs" | while read -r dir; do
|
||||
echo "$dir"
|
||||
gh workflow -R ArcadeAI/arcade-ai run "Publish Toolkit" -f toolkit=${dir}
|
||||
done
|
||||
else
|
||||
echo "No toolkit directories were changed"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue