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.
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.
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 |

version: masteractions-toolkit#438This patch extends the
versioninput 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.comtype- must bearchiveversion- a Docker version to install (example:v27.2.1) orlatest(last stable release)channel- a channel to install from (testorstable)image(new) - fetches binaries from themoby/moby-binanddockereng/cli-binrepositoriestype- must beimagetag- a tag of the image, can either use a tagged version like27.2.1or a branch name likemaster.Some examples: