tailscale / github-action

A GitHub Action to connect your workflow to your Tailscale network.
BSD 3-Clause "New" or "Revised" License
519 stars 78 forks source link

tailscale package repo moved? #84

Closed mziwisky closed 10 months ago

mziwisky commented 10 months ago

getting this failure w/ v1:

Run tailscale/github-action@v1
  with:
    authkey: ***
    version: 1.48.1
  env:
    AWS_DEFAULT_REGION: us-west-2
    AWS_REGION: us-west-2
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
Run MINOR=$(echo $VERSION | awk -F '.' {'print $2'})
  MINOR=$(echo $VERSION | awk -F '.' {'print $2'})
  if [ $((MINOR % 2)) -eq 0 ]; then
    URL="https://pkgs.tailscale.com/stable/tailscale_${VERSION}_amd64.tgz"
  else
    URL="https://pkgs.tailscale.com/unstable/tailscale_${VERSION}_amd64.tgz"
  fi
  curl $URL -o tailscale.tgz
  tar -C ${HOME} -xzf tailscale.tgz
  rm tailscale.tgz
  TSPATH=${HOME}/tailscale_${VERSION}_amd64
  sudo mv "${TSPATH}/tailscale" "${TSPATH}/tailscaled" /usr/bin
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    AWS_DEFAULT_REGION: us-west-2
    AWS_REGION: us-west-2
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
    VERSION: 1.48.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    81  100    81    0     0    247      0 --:--:-- --:--:-- --:--:--   248

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Error: Process completed with exit code 2.

looks like that URL is now a redirect:

curl -v  https://pkgs.tailscale.com/stable/tailscale_1.26.0_amd64.tgz
*   Trying 199.38.181.239:443...
* Connected to pkgs.tailscale.com (199.38.181.239) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=pkgs.tailscale.com
*  start date: Jul 22 17:17:19 2023 GMT
*  expire date: Oct 20 17:17:18 2023 GMT
*  subjectAltName: host "pkgs.tailscale.com" matched cert's "pkgs.tailscale.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /stable/tailscale_1.26.0_amd64.tgz]
* h2h3 [:scheme: https]
* h2h3 [:authority: pkgs.tailscale.com]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x12e00e800)
> GET /stable/tailscale_1.26.0_amd64.tgz HTTP/2
> Host: pkgs.tailscale.com
> user-agent: curl/7.88.1
> accept: */*
>
< HTTP/2 302
< content-type: text/html; charset=utf-8
< location: https://dl.tailscale.com/stable/tailscale_1.26.0_amd64.tgz
< strict-transport-security: max-age=63072000; includeSubDomains
< content-length: 81
< date: Fri, 25 Aug 2023 21:12:47 GMT
<
<a href="https://dl.tailscale.com/stable/tailscale_1.26.0_amd64.tgz">Found</a>.

* Connection #0 to host pkgs.tailscale.com left intact

i see v2 uses the same URL and doesn't follow redirects, so i suspect it's still a problem there, though I haven't yet tried to bump it

danderson commented 10 months ago

Hey! Thanks for the report. We were indeed moving our package infrastructure around, and looks like our github action needs fixing. I've rolled back the change, so the existing action should work again if you rerun it. Can you confirm?

erikols commented 10 months ago

Yes, working now after your rollback. Thanks!

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  7 18.3M    7 1488k    0     0  1591k      0  0:00:11 --:--:--  0:00:11 1591k
100 18.3M  100 18.3M    0     0  13.6M      0  0:00:01  0:00:01 --:--:-- 13.6M
mziwisky commented 10 months ago

agreed, looks good now, thanks for the quick response!