Skip to content

Commit

Permalink
docs: add basic usage exemple
Browse files Browse the repository at this point in the history
Signed-off-by: Emilien Escalle <[email protected]>
  • Loading branch information
neilime committed Jun 19, 2024
1 parent f7ac24c commit 89eb95b
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Some extra options can be passed to the `docker-compose down` command using the
<!-- start usage -->

```yaml
- uses: hoverkraft-tech/compose-action@v0.0.0
- uses: hoverkraft-tech/compose-action@v2.0.1
with:
# Description: Relative path to compose file(s). It can be a list of files.
#
Expand Down Expand Up @@ -97,6 +97,30 @@ Some extra options can be passed to the `docker-compose down` command using the
## Examples
### Example using in a full workflow
```yaml
name: Docker Compose Action

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Run docker-compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./docker/docker-compose.yml"

- name: Execute tests in the running services
run: |
docker-compose exec test-app pytest
```
<!-- start [.github/ghadocs/examples/] -->
<!-- end [.github/ghadocs/examples/] -->
Expand All @@ -105,7 +129,7 @@ Some extra options can be passed to the `docker-compose down` command using the
```yaml
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/compose-action@v1.5.1
- uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker/docker-compose.yml"
env:
Expand All @@ -120,7 +144,7 @@ Perform `docker-compose up` to some given service instead of all of them
steps:
# need checkout before using compose-action
- uses: actions/checkout@v3
- uses: hoverkraft-tech/compose-action@v1.5.1
- uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker/docker-compose.yml"
services: |
Expand Down Expand Up @@ -153,7 +177,7 @@ list of flags can be found in the
steps:
# need checkout before using compose-action
- uses: actions/checkout@v3
- uses: hoverkraft-tech/compose-action@v1.5.1
- uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./docker/docker-compose.yml"
services: |
Expand Down

0 comments on commit 89eb95b

Please sign in to comment.