docs: finalize README auto-generation

Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
This commit is contained in:
Emilien Escalle 2024-03-26 14:23:28 +01:00
parent 58c8fc28a1
commit e3871b5460
3 changed files with 61 additions and 5 deletions

View File

@ -14,6 +14,7 @@ jobs:
secrets: inherit
generate-readme:
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View File

@ -11,9 +11,6 @@
<!-- end title -->
<!-- start badges -->
<a href="https%3A%2F%2Fgithub.com%2F%2F%2Freleases%2Flatest"><img src="https://img.shields.io/github/v/release//?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release%20by%20tag" /></a><a href="https%3A%2F%2Fgithub.com%2F%2F%2Freleases%2Flatest"><img src="https://img.shields.io/github/release-date//?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release%20by%20date" /></a><img src="https://img.shields.io/github/last-commit//?logo=github&style=flat-square" alt="Commit" /><a href="https%3A%2F%2Fgithub.com%2F%2F%2Fissues"><img src="https://img.shields.io/github/issues//?logo=github&style=flat-square" alt="Open%20Issues" /></a><img src="https://img.shields.io/github/downloads///total?logo=github&style=flat-square" alt="Downloads" />
<!-- end badges -->
</div>
@ -55,6 +52,9 @@ Run your docker-compose file
```
<!-- end usage -->
## Inputs
<!-- start inputs -->
| **Input** | **Description** | **Default** | **Required** |
@ -68,5 +68,60 @@ Run your docker-compose file
<!-- end inputs -->
<!-- start outputs -->
<!-- end outputs -->
## Examples
<!-- start [.github/ghadocs/examples/] -->
<!-- end [.github/ghadocs/examples/] -->
### Example Using environment variables
```yaml
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/compose-action@v1.5.1
with:
compose-file: "./docker/docker-compose.yml"
env:
CUSTOM_VARIABLE: "test"
```
### Example using `services`
Perform `docker-compose up` to some given service instead of all of them
```yaml
steps:
# need checkout before using compose-action
- uses: actions/checkout@v3
- uses: hoverkraft-tech/compose-action@v1.5.1
with:
compose-file: "./docker/docker-compose.yml"
services: |
helloworld2
helloworld3
```
### Example using `up-flags`
Specify flags to pass to the `docker-compose up`. Default is none. Can be used to pass the `--build` flag, for example, if you want persistent volumes to be deleted as well during cleanup. A full list of flags can be found in the [docker-compose up documentation](https://docs.docker.com/compose/reference/up/).
### Example using `down-flags`
Specify flags to pass to the `docker-compose down` command during cleanup. Default is none. Can be used to pass the `--volumes` flag, for example, if you want persistent volumes to be deleted as well during cleanup. A full list of flags can be found in the [docker-compose down documentation](https://docs.docker.com/compose/reference/down/).
### Example using `compose-flags`
Specify flags to pass to the `docker-compose` command. Default is none. A full list of flags can be found in the [docker-compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
```yaml
steps:
# need checkout before using compose-action
- uses: actions/checkout@v3
- uses: hoverkraft-tech/compose-action@v1.5.1
with:
compose-file: "./docker/docker-compose.yml"
services: |
helloworld2
helloworld3
```

View File

@ -1,5 +1,5 @@
name: "Docker Compose Action"
description: "Run your docker-compose file"
description: "This action runs your docker-compose file and clean up before action finished"
inputs:
compose-file:
description: "Relative path to compose file(s). It can be a list of files."