Update documentation

This commit is contained in:
Ricardo J González C 2022-06-03 12:06:13 -05:00
parent 5e50ea4795
commit 2331a56248
4 changed files with 35 additions and 22 deletions

View File

@ -8,9 +8,11 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
compose-file: './docker/docker-compose.yml'
down-flags: '--volumes'
compose-file: "./docker/docker-compose.yml"
down-flags: "--volumes"
- uses: ./
with:
compose-file: './docker/docker-compose.yml'
up-one: 'helloworld'
compose-file: "./docker/docker-compose.yml"
services:
- "helloworld2"
- "helloworld3"

View File

@ -8,14 +8,18 @@ This action runs your docker-compose file and clean up before action finished.
**Optional** The name of the compose file. Default `"./docker-compose.yml"`.
### `services`
**Optional** Just perform `docker-compose up` to one service instead of all of them
### `up-flags`
**Optional** Used to 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/).
### `down-flags`
**Optional** Used to 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/).
### `up-one`
**Optional** Just perform `docker-compose up` to one service instead of all of them
## Example usage
```yaml

View File

@ -1,22 +1,25 @@
name: 'Docker Compose Action'
description: 'Run your docker-compose file'
name: "Docker Compose Action"
description: "Run your docker-compose file"
inputs:
compose-file: # id of input
description: 'relative path to compose file'
compose-file: # id of input
description: "relative path to compose file"
required: false
default: './docker-compose.yml'
down-flags: # id of input
description: 'additional options to pass to `docker-compose down` command'
default: "./docker-compose.yml"
down-flags: # id of input
description: "additional options to pass to `docker-compose down` command"
required: false
default: ''
down-flags: # id of input
description: 'service to perform docker-compose up'
default: ""
services: # id of input
description: "services to perform docker-compose up"
required: false
default: ''
up-flags: # id of input
description: "additional options to pass to `docker-compose up` command"
required: false
default: ""
runs:
using: 'node12'
main: 'main.js'
post: 'post.js'
using: "node12"
main: "main.js"
post: "post.js"
branding:
icon: anchor
color: blue

View File

@ -8,3 +8,7 @@ services:
image: hello-world
volumes:
- test_volume:/test:Z
helloworld2:
image: hello-world
helloworld3:
image: hello-world