-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildx: install release binaries from a fork #127
Conversation
loosely based on nicks/setup-buildx-action@e277290 The old approach always built from scratch, which added about 2 minutes to the CI pipeline. The new approach takes 30s (from cold cache) or 2s (if the tool is cached). |
d299bba
to
c0a58e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loosely based on nicks/setup-buildx-action@e277290
The old approach always built from scratch, which added about 2 minutes to the CI pipeline. The new approach takes 30s (from cold cache) or 2s (if the tool is cached).
If the idea is to be able to download from GitHub releases, let's just detect if a GH release-like URL is set in version
like https://github.com/crazy-max/buildx/releases/tag/v0.10.4%2Blocalstate2 and avoid using a Git-like URL that can be confusing.
This way we would not need an extra installReleaseFromFork
method but just check in download
if version is GH release URL:
actions-toolkit/src/buildx/install.ts
Line 46 in ca519e1
const release: GitHubRelease = await Install.getRelease(version); |
a0a9ebd
to
ebc4150
Compare
adds a new API method that uses the github releases API to find the appropriate version to download. Signed-off-by: Nick Santos <nick.santos@docker.com>
50d4386
to
f0845cb
Compare
thanks @crazy-max ! I cut a new version of this PR based on your comments. After this PR:
PTAL? This will also require some changes downstream to make this work (right now, setup-buildx-action doesn't even go down the |
…rivate forks Signed-off-by: Nick Santos <nick.santos@docker.com>
I'm going to back this change out for now. The hosted tool cache is a good stop gap. We'll revisit it if we need it! |
adds a new API method that uses the github releases API to find the appropriate version to download.