Skip to content

Commit

Permalink
updated script
Browse files Browse the repository at this point in the history
Signed-off-by: Natalia Luzuriaga <[email protected]>
  • Loading branch information
natalialuzuriaga committed Oct 29, 2024
1 parent fd80527 commit 34c3522
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/markdownToPDF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.get-dirs.outputs.all_changed_files }}
run: |
# Use sed to format the string
TIER_DIRS=$(echo "$ALL_CHANGED_FILES" | grep 'tier' | sed 's/ /", "/g; s/^/"&/; s/$/&"/')
# Format the changed file output into array
DIRS=$(echo "$ALL_CHANGED_FILES" | grep -oE 'tier[^ ]*' | sed 's/^/"/; s/$/"/' | paste -sd, -)
# Output the formatted array
TIER_DIRS="[$TIER_DIRS]"
echo "$TIER_DIRS"
# Output the array
DIRS="[$DIRS]"
echo "$DIRS"
echo "tiers=$TIER_DIRS" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 34c3522

Please sign in to comment.