Skip to content
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

docs: Document version csv format #139

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

vvoland
Copy link
Contributor

@vvoland vvoland commented Dec 13, 2024

@vvoland vvoland requested a review from crazy-max December 13, 2024 13:42
@vvoland vvoland self-assigned this Dec 13, 2024
@vvoland vvoland requested a review from dvdksn December 13, 2024 13:43
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL @dvdksn

| `set-host` | Bool | `false` | Set `DOCKER_HOST` environment variable to docker socket path. |
| `rootless` | Bool | `false` | Start daemon in rootless mode |

### inputs.version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this to TOC after

* [inputs](#inputs)

README.md Outdated
Comment on lines 142 to 147
| Type | Key | Default | Description |
|------------|-----------|------------|--------------------------------------------------------------------------------------|
| | `type` | `archive` | The source type of the Docker binaries. Possible values are `archive` and `image`. |
| `archive` | `channel` | `stable` | The download.docker.com channel (`stable` or `test`). |
| `archive` | `version` | `latest` | The Docker version to use. |
| `image` | `tag` | `latest` | The image tag to use. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: got a bit confused at first when looking at this table. Maybe we could split by type like we do in metadata-action repo: https://github.com/docker/metadata-action?tab=readme-ov-file#tags-input

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@crazy-max crazy-max merged commit 370a7da into docker:master Dec 16, 2024
30 checks passed
Copy link

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh 🤦🏻 I was too slow to submit my comments. @crazy-max I can do a follow-up PR if that's OK with you?

Comment on lines +126 to +133
By default, the latest stable version of Docker is fetched from download.docker.com.

You can specify a specific version number (e.g. `v27.4.0`).
Which is a shorthand for the full comma separated value:

`type=archive,channel=stable,version=v27.4.0`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
By default, the latest stable version of Docker is fetched from download.docker.com.
You can specify a specific version number (e.g. `v27.4.0`).
Which is a shorthand for the full comma separated value:
`type=archive,channel=stable,version=v27.4.0`
By default, the latest stable version of Docker is fetched from download.docker.com.
To specify a specific version, use the `version` input:
```yaml
-
name: Set up Docker
uses: docker/setup-docker-action@v4
with:
version: 27.4.0
```


`type=archive,channel=stable,version=v27.4.0`

You can also use this full csv format instead.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can also use this full csv format instead.
The `version` input also supports a CSV string format for more advanced
version selection. For example, to use v27.3.0-rc.1 from the test channel:
```yaml
-
name: Set up Docker
uses: docker/setup-docker-action@v4
with:
version: type=archive,channel=stable,version=v27.4.0
```

README.md Outdated
Comment on lines 135 to 138
Other possible source type is `image` which will pull the Docker binaries from the
`moby/moby-bin` and `dockereng/cli-bin` Docker Hub repositories.
The advantage of using this source type is that these images are built by the Moby and Docker CI pipelines
for each branch and PR, so you can use the `tag` input to install a specific version or branch (e.g. `master`).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Other possible source type is `image` which will pull the Docker binaries from the
`moby/moby-bin` and `dockereng/cli-bin` Docker Hub repositories.
The advantage of using this source type is that these images are built by the Moby and Docker CI pipelines
for each branch and PR, so you can use the `tag` input to install a specific version or branch (e.g. `master`).
If you use the CSV format with `type=archive`, you can use `channel` and
`version` to select the version of the Docker archive. Alternatively, you can
use `type=image,tag=<version>` instead of `type=archive`.
If you use `type=image`, the runner pulls the binaries from the `moby/moby-bin`
(Docker daemon binary) and `dockereng/cli-bin` (Docker CLI binary) Docker Hub
repositories. Sourcing the Docker binary from the Docker Hub repositories is
useful when you want to install a version of Docker for a specific Git branch.
These images are built by the Moby and Docker CI pipelines for each branch and PR.
For example, to use the latest `master` version of Docker:
```yaml
-
name: Set up Docker
uses: docker/setup-docker-action@v4
with:
version: type=image,tag=master
```

@crazy-max
Copy link
Member

oh 🤦🏻 I was too slow to submit my comments. @crazy-max I can do a follow-up PR if that's OK with you?

Ah sorry I merged too fast, please feel free to open a PR 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants