From 4e4c49acaa9818630ce0bd7a564372c17e33fb4d Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Fri, 25 Aug 2023 16:14:10 -0700 Subject: [PATCH] Ensure curl calls follow redirects. (#85) Signed-off-by: M. J. Fromberger --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index c1b5ef3..4206356 100644 --- a/action.yml +++ b/action.yml @@ -80,9 +80,9 @@ runs: URL="https://pkgs.tailscale.com/unstable/tailscale_${VERSION}_${TS_ARCH}.tgz" fi if ! [[ "$SHA256SUM" ]] ; then - SHA256SUM="$(curl "${URL}.sha256")" + SHA256SUM="$(curl -H user-agent:tailscale-github-action -L "${URL}.sha256")" fi - curl "$URL" -o tailscale.tgz --max-time 300 + curl -H user-agent:tailscale-github-action -L "$URL" -o tailscale.tgz --max-time 300 echo "$SHA256SUM tailscale.tgz" | sha256sum -c tar -C /tmp -xzf tailscale.tgz rm tailscale.tgz