mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-12 23:53:07 +08:00
docs: finalize README auto-generation
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
This commit is contained in:
parent
58c8fc28a1
commit
e3871b5460
1
.github/workflows/main-ci.yml
vendored
1
.github/workflows/main-ci.yml
vendored
@ -14,6 +14,7 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
generate-readme:
|
generate-readme:
|
||||||
|
needs: ci
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
63
README.md
63
README.md
@ -11,10 +11,7 @@
|
|||||||
|
|
||||||
<!-- end title -->
|
<!-- end title -->
|
||||||
<!-- start badges -->
|
<!-- start badges -->
|
||||||
|
<!-- end 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>
|
</div>
|
||||||
<!-- start description -->
|
<!-- start description -->
|
||||||
@ -55,6 +52,9 @@ Run your docker-compose file
|
|||||||
```
|
```
|
||||||
|
|
||||||
<!-- end usage -->
|
<!-- end usage -->
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
<!-- start inputs -->
|
<!-- start inputs -->
|
||||||
|
|
||||||
| **Input** | **Description** | **Default** | **Required** |
|
| **Input** | **Description** | **Default** | **Required** |
|
||||||
@ -68,5 +68,60 @@ Run your docker-compose file
|
|||||||
<!-- end inputs -->
|
<!-- end inputs -->
|
||||||
<!-- start outputs -->
|
<!-- start outputs -->
|
||||||
<!-- end outputs -->
|
<!-- end outputs -->
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
<!-- start [.github/ghadocs/examples/] -->
|
<!-- start [.github/ghadocs/examples/] -->
|
||||||
<!-- end [.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
|
||||||
|
```
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: "Docker Compose Action"
|
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:
|
inputs:
|
||||||
compose-file:
|
compose-file:
|
||||||
description: "Relative path to compose file(s). It can be a list of files."
|
description: "Relative path to compose file(s). It can be a list of files."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user