-
-
Save KyMidd/c1f3cb12a51781d2cb5b09ffa962efca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print out list of pods we'll be targeting | |
echo "We'll be targeting the following pods:" | |
while IFS=$'\n' read -r POD; do | |
echo "- $POD" | |
done <<< "$TARGETED_PODS" | |
# Remove old file and put all pods into list like: 'pod1','pod2','pod3' | |
rm -f TARGETED_PODS_HOLDER | |
while IFS=$'\n' read -r POD; do | |
printf "'$POD'", >> TARGETED_PODS_HOLDER | |
done <<< "$TARGETED_PODS" | |
# Read file as var and remove trailing comma | |
TARGETED_PODS_OUTPUT=$(cat TARGETED_PODS_HOLDER | sed 's/,$//') | |
# Send TARGETED_PODS to output | |
echo "TARGETED_PODS=[${TARGETED_PODS_OUTPUT}]" >> $GITHUB_OUTPUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment