2020-08-28 20:05:32 +08:00
# GitHub action to setup `docker-compose` command
2020-08-27 11:53:14 +08:00
2020-08-28 20:05:32 +08:00
< a href = "https://github.com/KengoTODA/actions-setup-docker-compose/actions" > < img alt = "actions-setup-docker-compose status" src = "https://github.com/KengoTODA/actions-setup-docker-compose/workflows/build-test/badge.svg" > < / a >
2020-08-27 11:53:14 +08:00
2020-08-30 08:01:54 +08:00
This action downloads the `docker-compose` command and add it to the `PATH` for following executions. It supports the Linux environment only.
2020-08-27 11:53:14 +08:00
2020-08-28 20:05:32 +08:00
## How to use
2020-08-27 11:53:14 +08:00
2020-08-28 20:05:32 +08:00
Add a step to your workflow like below:
2020-08-27 11:53:14 +08:00
2020-08-28 20:05:32 +08:00
```yml
steps:
- uses: KengoTODA/actions-setup-docker-compose@main
with:
2022-12-25 13:58:23 +08:00
version: '2.14.2' # the full version of `docker-compose` command
2020-08-27 11:53:14 +08:00
```
2022-12-25 13:58:23 +08:00
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.