From 4098cb8464a8f9851f5a888b0575be1a3c92147d Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:11:20 -0800 Subject: [PATCH] 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. --- .github/workflows/check-toolkits.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-toolkits.yml b/.github/workflows/check-toolkits.yml index 62b370c6..f5af6506 100644 --- a/.github/workflows/check-toolkits.yml +++ b/.github/workflows/check-toolkits.yml @@ -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