compose-action/action.yml
dependabot[bot] b49a5ca3bb chore(deps): bump the github-actions-dependencies group across 1 directory with 3 updates
Bumps the github-actions-dependencies group with 3 updates in the / directory:
[hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common),
[hoverkraft-tech/ci-dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor)
and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-dokumentor
  dependency-version: 0.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: actions/create-github-app-token
  dependency-version: 2.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-09-30 12:43:55 +02:00

74 lines
2.5 KiB
YAML

name: "Docker Compose Action"
description: |
This action runs your compose file(s) and clean up before action finished
### Action
The action will run `docker compose up` to start the services defined in the given compose file(s).
The compose file(s) can be specified using the `compose-file` input.
Some extra options can be passed to the `docker compose up` command using the `up-flags` input.
### Post hook
On post hook, the action will run `docker compose down` to clean up the services.
Logs of the Docker Compose services are logged using GitHub `core.ts` API before the cleanup.
The log level can be set using the `services-log-level` input.
The default is `debug`, which will only print logs if [debug mode](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging) is switched on.
Some extra options can be passed to the `docker compose down` command using the `down-flags` input.
author: "hoverkraft"
branding:
icon: anchor
color: blue
inputs:
docker-flags:
description: "Additional options to pass to `docker` command."
required: false
compose-file:
description: "Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd)."
required: false
default: "./docker-compose.yml"
services:
description: "Services to perform `docker compose up`."
required: false
up-flags:
description: "Additional options to pass to `docker compose up` command."
required: false
default: ""
down-flags:
description: "Additional options to pass to `docker compose down` command."
required: false
default: ""
compose-flags:
description: "Additional options to pass to `docker compose` command."
required: false
default: ""
cwd:
description: "Current working directory"
required: false
default: ${{ github.workspace }}
compose-version:
description: |
Compose version to use.
If null (default), it will use the current installed version.
If "latest", it will install the latest version.
required: false
services-log-level:
description: |
The log level used for Docker Compose service logs.
Can be one of "debug", "info".
required: false
default: "debug"
github-token:
description: The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose).
default: ${{ github.token }}
required: false
runs:
using: node20
main: dist/index.js
post: dist/post.js