name: "Docker Compose Action"
description: "This action runs your compose file(s) and clean up before action finished"
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
