From 494667c85df63219956c34f889b569ef809bb5bf Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sat, 16 Jan 2021 11:45:26 -0800 Subject: [PATCH] Use Location: header for GitHub API call Signed-off-by: Dan Schaper --- gh-actions-vars.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-actions-vars.sh b/gh-actions-vars.sh index 856b04d..1f10529 100755 --- a/gh-actions-vars.sh +++ b/gh-actions-vars.sh @@ -41,7 +41,7 @@ MULTIARCH_IMAGE="${BASE_IMAGE}:${GIT_TAG}" # To get latest released, cut a release on https://github.com/pi-hole/docker-pi-hole/releases (manually gated for quality control) latest_tag='UNKNOWN' -if ! latest_tag=$(curl -sI https://github.com/pi-hole/docker-pi-hole/releases/latest | grep --color=never -i Location | awk -F / '{print $NF}' | tr -d '[:cntrl:]'); then +if ! latest_tag=$(curl -sI https://github.com/pi-hole/docker-pi-hole/releases/latest | grep --color=never -i Location: | awk -F / '{print $NF}' | tr -d '[:cntrl:]'); then print "Failed to retrieve latest docker-pi-hole release metadata" else if [[ "${GIT_TAG}" == "${latest_tag}" ]] ; then