@@ -53,26 +53,31 @@ jobs:
5353 gh pr checkout ${{ github.event.issue.number }}
5454 git submodule update --init --recursive
5555 OUTPUT=$(git log -1 --format='%H')
56- echo "commit-sha=$OUTPUT" >> $GITHUB_OUTPUT
56+ echo "commit-sha=$OUTPUT" >> " $GITHUB_OUTPUT"
5757
5858 - name : Prepare The Example List
5959 env :
6060 COMMENT : ${{ github.event.comment.body }}
6161 id : get-example-list-name
6262 run : |
63- PATHS=$(echo $COMMENT | sed 's/^.*\/test-examples="//g' | cut -d '"' -f 1 | sed 's/,/ /g')
63+ PATHS=$(echo " $COMMENT" | sed 's/^.*\/test-examples="//g' | cut -d '"' -f 1 | sed 's/,/ /g')
6464 EXAMPLE_LIST=""
65- for P in $PATHS; do EXAMPLE_LIST="${EXAMPLE_LIST},$(find $P -name '*.yaml' | tr '\n' ',')"; done
65+ for P in $PATHS; do EXAMPLE_LIST="${EXAMPLE_LIST},$(find "$P" -name '*.yaml' | tr '\n' ',')"; done
6666
6767 sudo apt-get -y install coreutils
68- COUNT=$(echo ${EXAMPLE_LIST:1} | grep -o ".yaml" | wc -l)
69- if [ $COUNT -gt 1 ]; then EXAMPLE_HASH=$(echo ${EXAMPLE_LIST} | md5sum | cut -f1 -d" "); else EXAMPLE_HASH=$(echo ${EXAMPLE_LIST:1} | sed 's/.$//'); fi
68+ COUNT=$(echo "${EXAMPLE_LIST:1}" | grep -o ".yaml" | wc -l)
69+ if [ "$COUNT" -gt 1 ]; then
70+ EXAMPLE_HASH=$(echo "${EXAMPLE_LIST}" | md5sum | cut -f1 -d" ");
71+ else
72+ EXAMPLE_HASH=${EXAMPLE_LIST:1}
73+ EXAMPLE_HASH=${EXAMPLE_HASH%,}
74+ fi
7075
7176 echo "Examples: ${EXAMPLE_LIST:1}"
7277 echo "Example Hash: ${EXAMPLE_HASH}"
7378
74- echo "example-list=${EXAMPLE_LIST:1}" >> $GITHUB_OUTPUT
75- echo "example-hash=${EXAMPLE_HASH}" >> $GITHUB_OUTPUT
79+ echo "example-list=${EXAMPLE_LIST:1}" >> " $GITHUB_OUTPUT"
80+ echo "example-hash=${EXAMPLE_HASH}" >> " $GITHUB_OUTPUT"
7681
7782 - name : Create Pending Status Check
7883 env :
@@ -123,7 +128,7 @@ jobs:
123128 gh pr checkout ${{ github.event.issue.number }}
124129 git submodule update --init --recursive
125130 OUTPUT=$(git log -1 --format='%H')
126- echo "commit-sha=$OUTPUT" >> $GITHUB_OUTPUT
131+ echo "commit-sha=$OUTPUT" >> " $GITHUB_OUTPUT"
127132
128133 - name : Vendor Dependencies
129134 run : make vendor vendor.check
@@ -169,7 +174,7 @@ jobs:
169174 - name : Cleanup
170175 if : always()
171176 run : |
172- eval $(make --no-print-directory build.vars)
177+ eval " $(make --no-print-directory build.vars)"
173178 ${KUBECTL} delete managed --all || true
174179
175180 - name : Create Unsuccessful Status Check
0 commit comments