Skip to content

Commit

Permalink
Fix bash cut
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Oct 30, 2024
1 parent 6d516d5 commit 3dbcec5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/link_labs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
for FILE in $FILES; do
if [[ "$FILE" == communities/*/lab/* ]]; then
NAME=$(echo "$FILE" | cut -d'/' -f5)
NAME=$(echo "$FILE" | cut -d'/' -f2)
# Check if this directory has already been processed
if [[ -n "$NAME" && -z "${directories[$NAME]}" ]]; then
if [[ -z "${directories[$NAME]}" ]]; then
echo "Posting link for ${NAME}..."
directories[$NAME]=1
cat <<EOF > comment.md
Expand All @@ -50,5 +50,7 @@ jobs:
EOF
gh pr comment "$PR_NUMBER" --body "$(cat comment.md)"
fi
else
echo "Ignoring changes to $FILE: not in a lab directory"
fi
done

0 comments on commit 3dbcec5

Please sign in to comment.