Closed jacobwgillespie closed 2 years ago
Hey, thanks for the PR. We haven't had time to look at it yet. If we merge this, will people still be able to use older versions of the action?
EDIT: I didn't see your last comment. So I'll merge this for now and give it a try.
While running this without arguments, I'm seeing:
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: "flyctl deploy --remote-only"
Run superfly/flyctl-actions/setup-flyctl@master
with:
version: latest
env:
FLY_API_TOKEN: ***
DOCKER_BUILDKIT: 1
Invalid URL
Waiting 16 seconds before trying again
Invalid URL
Waiting 16 seconds before trying again
Error: Invalid URL
@jsierles I think that's a transient failure from the Fly API, we've had a few builds receive the following response from the releases API using the install.sh
script:
Error: Unable to find a flyctl release for Linux/x86_64/latest - see github.com/superfly/flyctl/releases for all versions
I've opened PR #21 to add better error handling, now a response like ☝️ would be displayed in the Actions log.
I'm still seeing this error displayed as Invalid URL
. Maybe it's coming from elsewhere?
You have a FLY_API_TOKEN
env var set that I don't (as I haven't provided it yet in my workflow) - does the releases API change behavior if an API key is provided?
Actually that's likely not related give that the action doesn't read that variable...
It looks like Waiting x seconds before trying again
comes from https://github.com/actions/checkout/blob/2d1c1198e79c30cca5c3957b1e3b65ce95b5356e/src/retry-helper.ts#L37
Looks like that helper is used when the Actions SDK attempts to download flyctl
for the tool cache - I've opened #22 to add a log message to print what URL it's attempting to download, so we can see what it's trying to do in your repo. I'm currently not able to reproduce with a simple example: https://github.com/jacobwgillespie/fly-actions-test/actions/runs/2034036051
This PR adds a new
superfly/flyctl-actions/setup-flyctl
action in the style mentioned in #12 - the action downloads and installsflyctl
using the GitHub Actions toolkit tool cache:It's possible to specify a specific version of the CLI to install as well (#10):
The advantage of this approach compared to the current
Dockerfile
action is.tar.gz
is significantly faster than building the Dockerfile, and by using@actions/tool-cache
, GitHub can cacheflyctl
between runs.flyctl auth docker
) just work as expected.For now, this PR adds the action in a subdirectory. You could choose to replace the current action at the root of the repo and publish a new major version, or you could choose to offer both, this PR doesn't make any assumptions either way.
Closes #12 (and possibly #10)