-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
- Loading branch information
Showing
9 changed files
with
124 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"paths": { | ||
"action": "action.yml", | ||
"readme": "README.md" | ||
}, | ||
"show_logo": true, | ||
"versioning": { | ||
"enabled": true, | ||
"override": "", | ||
"prefix": "v", | ||
"branch": "main" | ||
}, | ||
"owner": "bitflight-devops", | ||
"repo": "github-action-readme-generator", | ||
"title_prefix": "GitHub Action: ", | ||
"prettier": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
### 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" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
### 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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
### 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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
### 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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
### 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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,23 @@ | ||
# Docker Compose Action | ||
|
||
This action runs your docker-compose file and clean up before action finished. | ||
|
||
## Inputs | ||
|
||
### `compose-file` | ||
|
||
**Optional** The name of the compose file. Default `"./docker-compose.yml"`. | ||
|
||
It can be a list of files: | ||
|
||
```yml | ||
compose-file: | | ||
docker-compose.yml | ||
docker-compose.ci.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/). | ||
|
||
### `compose-flags` | ||
|
||
**Optional** Used to 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). | ||
|
||
## Example usage | ||
|
||
```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" | ||
down-flags: "--volumes" | ||
services: | | ||
helloworld2 | ||
helloworld3 | ||
``` | ||
|
||
### Using environment variables | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: hoverkraft-tech/compose-action@v1.5.1 | ||
with: | ||
compose-file: "./docker/docker-compose.yml" | ||
env: | ||
CUSTOM_VARIABLE: "test" | ||
``` | ||
<!-- markdownlint-disable-next-line first-line-heading --> | ||
<div align="center" width="100%"> | ||
<!-- start branding --> | ||
<!-- end branding --> | ||
<!-- start title --> | ||
<!-- end title --> | ||
<!-- start badges --> | ||
<!-- end badges --> | ||
--- | ||
|
||
</div> | ||
<!-- start description --> | ||
<!-- end description --> | ||
<!-- start contents --> | ||
<!-- end contents --> | ||
<!-- start usage --> | ||
<!-- end usage --> | ||
<!-- start inputs --> | ||
<!-- end inputs --> | ||
<!-- start outputs --> | ||
<!-- end outputs --> | ||
<!-- start [.github/ghadocs/examples/] --> | ||
<!-- end [.github/ghadocs/examples/] --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters