Skip to content

Commit

Permalink
check-remote-image-existence.sh: change to tab
Browse files Browse the repository at this point in the history
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
  • Loading branch information
norio-nomura committed Jul 25, 2024
1 parent 8852c39 commit 6dd58e0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions hack/check-remote-image-existence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ script_dir=$(dirname "$0")

result=0
for template in $(realpath "${script_dir}"/../examples/*.yaml "${script_dir}"/./test-templates/*.yaml|sort -u); do
for location in $(yq eval '.images[].location' "${template}"); do
if [[ "${location}" == http* ]]; then
response=$(curl -L -s -I -o /dev/null -w "%{http_code}" "${location}")
if [[ ${response} != "200" ]]; then
line=$(grep -n "${location}" "${template}" | cut -d ':' -f 1)
echo "::error file=${template},line=${line}::response: ${response} for ${location}"
result=1
else
echo "response: ${response} for ${location}"
fi
fi
done
for location in $(yq eval '.images[].location' "${template}"); do
if [[ "${location}" == http* ]]; then
response=$(curl -L -s -I -o /dev/null -w "%{http_code}" "${location}")
if [[ ${response} != "200" ]]; then
line=$(grep -n "${location}" "${template}" | cut -d ':' -f 1)
echo "::error file=${template},line=${line}::response: ${response} for ${location}"
result=1
else
echo "response: ${response} for ${location}"
fi
fi
done
done

exit "${result}"

0 comments on commit 6dd58e0

Please sign in to comment.