-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support downloading binaries from docker images #106
Conversation
src/context.ts
Outdated
if (version.indexOf('=') !== -1) { | ||
const csv = version.split(','); | ||
for (const c of csv) { | ||
const kv = c.split('='); | ||
values.set(kv[0], kv[1]); | ||
} | ||
} else { | ||
values.set('type', 'archive'); | ||
values.set('version', version); | ||
} |
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.
You can rely on https://www.npmjs.com/package/csv-parse library like we do in https://github.com/docker/actions-toolkit/blob/2eba5d9d103d5a314b8dcfada334a3cca52459ad/src/buildx/build.ts#L201-L217 or the metadata-action:
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.
some tests fail: https://github.com/crazy-max/ghaction-setup-docker/actions/runs/11577764011/job/32229933906?pr=106#step:3:274
also missing dist generation: docker buildx bake pre-checkin
, see https://github.com/crazy-max/ghaction-setup-docker/blob/master/.github/CONTRIBUTING.md#submitting-a-pull-request
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland Added extra commit to test
|
I guess we could use the commit sha from We could also use We can look at this as follow-up. |
Does not seem to work on macOS: https://github.com/crazy-max/ghaction-setup-docker/actions/runs/11588305245/job/32265459115?pr=106#step:5:11
@vvoland I'm taking a look to switch to undock but if you want to fix this issue, feel free to open a PR on actions-toolkit repo |
The issue here is that 27.0.0 was the first version to have the darwin builds in the dockereng/cli-bin: |
@crazy-max - Opened a PR to get the git revision from |
Ah right my bad! Let me change the ref here |
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.
Ok let's get this one in so we can test this workflow on moby using crazy-max/ghaction-setup-docker@master
.
version: master
actions-toolkit#438This patch extends the
version
input parameter to also accept an CSV-style options allowing to specify a different installation source of the docker binaries:archive
(old and still default) - fetches static binaries fromdownload.docker.com
type
- must bearchive
version
- a Docker version to install (example:v27.2.1
) orlatest
(last stable release)channel
- a channel to install from (test
orstable
)image
(new) - fetches binaries from themoby/moby-bin
anddockereng/cli-bin
repositoriestype
- must beimage
tag
- a tag of the image, can either use a tagged version like27.2.1
or a branch name likemaster
.Some examples: