feat: Default docker-compose version to latest (#643)

* test: add expected behavior as a test case

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* implement the necessary feature

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* add a missing return type

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* ci: try to run action without GITHUB_TOKEN env var

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* input version is not required

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* update the distributed package

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* fix eslint warning

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* provide GITHUB_TOKEN to create Octokit

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* docs: update README.md

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* docs: update README.md

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* docs: update README.md

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* docs: update README.md

Signed-off-by: Kengo TODA <skypencil@gmail.com>

* update distributions

Signed-off-by: Kengo TODA <skypencil@gmail.com>

Signed-off-by: Kengo TODA <skypencil@gmail.com>
This commit is contained in:
Kengo TODA
2022-12-25 13:58:23 +08:00
committed by GitHub
parent 83838f3182
commit c61c6f59f3
11 changed files with 8775 additions and 58 deletions

View File

@@ -12,7 +12,18 @@ Add a step to your workflow like below:
steps:
- uses: KengoTODA/actions-setup-docker-compose@main
with:
version: '1.29.2'
version: '2.14.2' # the full version of `docker-compose` command
```
The `version` parameter is required, specify the full version of `docker-compose` command.
Or you can omit it then set a `GITHUB_TOKEN` environment variable, to use the latest released version:
```yml
steps:
- uses: KengoTODA/actions-setup-docker-compose@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
The 'latest release' here means [the most recent non-prerelease, non-draft release, sorted by the created_at attribute](https://octokit.github.io/rest.js/v19#repos-get-latest-release).
Note that the `GITHUB_TOKEN` should have [`contents: read` permission](https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#contents) to fetch data from the GitHub.com.