mirror of
https://github.com/tailscale/github-action.git
synced 2026-08-20 10:49:23 +00:00
add timeout on steps with network I/O
Set a reasonable timeout to prevent jobs from hanging for hours (#50). 5 minutes is way longer than should ever be necessary, but accounts for intermittent networking issues on either the actions runner or the Tailscale package or control server. Users can always set a shorter timeout on their own action step. Fixes #50 Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
parent
62fddffa64
commit
65cdd9a05d
1 changed files with 2 additions and 2 deletions
|
|
@ -82,7 +82,7 @@ runs:
|
|||
if ! [[ "$SHA256SUM" ]] ; then
|
||||
SHA256SUM="$(curl "${URL}.sha256")"
|
||||
fi
|
||||
curl "$URL" -o tailscale.tgz
|
||||
curl "$URL" -o tailscale.tgz --max-time 300
|
||||
echo "$SHA256SUM tailscale.tgz" | sha256sum -c
|
||||
tar -C /tmp -xzf tailscale.tgz
|
||||
rm tailscale.tgz
|
||||
|
|
@ -113,4 +113,4 @@ runs:
|
|||
TAILSCALE_AUTHKEY="${{ inputs['oauth-secret'] }}?preauthorized=true&ephemeral=true"
|
||||
TAGS_ARG="--advertise-tags=${{ inputs.tags }}"
|
||||
fi
|
||||
sudo -E tailscale up ${TAGS_ARG} --authkey=${TAILSCALE_AUTHKEY} --hostname=${HOSTNAME} --accept-routes ${ADDITIONAL_ARGS}
|
||||
timeout 5m sudo -E tailscale up ${TAGS_ARG} --authkey=${TAILSCALE_AUTHKEY} --hostname=${HOSTNAME} --accept-routes ${ADDITIONAL_ARGS}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue