mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-11 23:23:06 +08:00
Update documentation
This commit is contained in:
parent
5e50ea4795
commit
2331a56248
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -8,9 +8,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
compose-file: './docker/docker-compose.yml'
|
compose-file: "./docker/docker-compose.yml"
|
||||||
down-flags: '--volumes'
|
down-flags: "--volumes"
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
compose-file: './docker/docker-compose.yml'
|
compose-file: "./docker/docker-compose.yml"
|
||||||
up-one: 'helloworld'
|
services:
|
||||||
|
- "helloworld2"
|
||||||
|
- "helloworld3"
|
||||||
|
|||||||
12
README.md
12
README.md
@ -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"`.
|
**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`
|
### `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/).
|
**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
|
## Example usage
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
31
action.yml
31
action.yml
@ -1,22 +1,25 @@
|
|||||||
name: 'Docker Compose Action'
|
name: "Docker Compose Action"
|
||||||
description: 'Run your docker-compose file'
|
description: "Run your docker-compose file"
|
||||||
inputs:
|
inputs:
|
||||||
compose-file: # id of input
|
compose-file: # id of input
|
||||||
description: 'relative path to compose file'
|
description: "relative path to compose file"
|
||||||
required: false
|
required: false
|
||||||
default: './docker-compose.yml'
|
default: "./docker-compose.yml"
|
||||||
down-flags: # id of input
|
down-flags: # id of input
|
||||||
description: 'additional options to pass to `docker-compose down` command'
|
description: "additional options to pass to `docker-compose down` command"
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ""
|
||||||
down-flags: # id of input
|
services: # id of input
|
||||||
description: 'service to perform docker-compose up'
|
description: "services to perform docker-compose up"
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
up-flags: # id of input
|
||||||
|
description: "additional options to pass to `docker-compose up` command"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: "node12"
|
||||||
main: 'main.js'
|
main: "main.js"
|
||||||
post: 'post.js'
|
post: "post.js"
|
||||||
branding:
|
branding:
|
||||||
icon: anchor
|
icon: anchor
|
||||||
color: blue
|
color: blue
|
||||||
|
|||||||
@ -8,3 +8,7 @@ services:
|
|||||||
image: hello-world
|
image: hello-world
|
||||||
volumes:
|
volumes:
|
||||||
- test_volume:/test:Z
|
- test_volume:/test:Z
|
||||||
|
helloworld2:
|
||||||
|
image: hello-world
|
||||||
|
helloworld3:
|
||||||
|
image: hello-world
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user