action-doctl
action-doctl copied to clipboard
Gracefully fallback to the previous version if doctl release contains no assets
To prevent a reoccurrence of https://github.com/digitalocean/action-doctl/issues/90, we should gracefully fallback to the previous version if doctl release contains no assets when installing latest.
the fallback mechanism is broken @kishlay-singh-DO , likely due to extra v character being interpolated in (e.g. vv1.143.0)
see below output
Warning: Failed to download doctl v1.144.0: Unexpected HTTP response: 404
Warning: Failed to download doctl v1.144.0, trying fallback versions
Attempting to download doctl vv1.144.0
Warning: Failed to download doctl vv1.144.0: Unexpected HTTP response: 404
Warning: Failed to download doctl vv1.144.0, trying next version
Attempting to download doctl vv1.144.0-beta
Warning: Failed to download doctl vv1.144.0-beta: Unexpected HTTP response: 404
Warning: Failed to download doctl vv1.144.0-beta, trying next version
Attempting to download doctl vv1.143.0
Warning: Failed to download doctl vv1.143.0: Unexpected HTTP response: 404
Warning: Failed to download doctl vv1.143.0, trying next version
Attempting to download doctl vv1.142.0
Warning: Failed to download doctl vv1.142.0: Unexpected HTTP response: 404
Warning: Failed to download doctl vv1.142.0, trying next version
Attempting to download doctl vv1.141.0
Warning: Failed to download doctl vv1.141.0: Unexpected HTTP response: 404
Warning: Failed to download doctl vv1.141.0, trying next version
Error: Failed to download doctl. Tried versions: v1.144.0, v1.144.0-beta, v1.143.0, v1.142.0, v1.141.0
@dkrieger Looking into this, I think the extra v is just a missed addition in the logs. Let me fix this!
Found the issue and created a PR for the fix https://github.com/digitalocean/action-doctl/pull/99