{"id":13566958,"url":"https://github.com/hoverkraft-tech/compose-action","last_synced_at":"2026-01-18T11:08:51.205Z","repository":{"id":38302862,"uuid":"309266241","full_name":"hoverkraft-tech/compose-action","owner":"hoverkraft-tech","description":"This action runs your docker-compose file and clean up before action finished","archived":false,"fork":false,"pushed_at":"2025-03-28T06:06:47.000Z","size":15028,"stargazers_count":169,"open_issues_count":2,"forks_count":25,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T07:01:41.068Z","etag":null,"topics":["docker-compose","github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/docker-compose-action","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoverkraft-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-02T05:20:19.000Z","updated_at":"2025-03-28T06:06:50.000Z","dependencies_parsed_at":"2024-01-13T15:37:31.726Z","dependency_job_id":"0fdebd0d-bdb2-4968-80ea-167690ccd428","html_url":"https://github.com/hoverkraft-tech/compose-action","commit_stats":{"total_commits":88,"total_committers":14,"mean_commits":6.285714285714286,"dds":0.7159090909090908,"last_synced_commit":"3672da12997340f49a57fc1bd566dcf00ae9cda3"},"previous_names":["hoverkraft-tech/compose-action","isbang/compose-action"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fcompose-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fcompose-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fcompose-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoverkraft-tech%2Fcompose-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoverkraft-tech","download_url":"https://codeload.github.com/hoverkraft-tech/compose-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103290,"owners_count":20884023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","github-actions"],"created_at":"2024-08-01T13:02:20.291Z","updated_at":"2026-01-18T11:08:51.199Z","avatar_url":"https://github.com/hoverkraft-tech.png","language":"TypeScript","funding_links":[],"categories":["github-actions","TypeScript"],"sub_categories":[],"readme":"\u003c!-- header:start --\u003e\n\n# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYW5jaG9yIiBjb2xvcj0iYmx1ZSI+PGNpcmNsZSBjeD0iMTIiIGN5PSI1IiByPSIzIj48L2NpcmNsZT48bGluZSB4MT0iMTIiIHkxPSIyMiIgeDI9IjEyIiB5Mj0iOCI+PC9saW5lPjxwYXRoIGQ9Ik01IDEySDJhMTAgMTAgMCAwIDAgMjAgMGgtMyI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Docker Compose Action\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".github/logo.svg\" width=\"60px\" align=\"center\" alt=\"Docker Compose Action\" /\u003e\n\u003c/div\u003e\n\n---\n\n\u003c!-- header:end --\u003e\n\n\u003c!-- badges:start --\u003e\n\n[![Marketplace](https://img.shields.io/badge/Marketplace-docker--compose--action-blue?logo=github-actions)](https://github.com/marketplace/actions/docker-compose-action)\n[![Release](https://img.shields.io/github/v/release/hoverkraft-tech/compose-action)](https://github.com/hoverkraft-tech/compose-action/releases)\n[![License](https://img.shields.io/github/license/hoverkraft-tech/compose-action)](http://choosealicense.com/licenses/mit/)\n[![Stars](https://img.shields.io/github/stars/hoverkraft-tech/compose-action?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/compose-action?style=social)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/compose-action/blob/main/CONTRIBUTING.md)\n[![codecov](https://codecov.io/gh/hoverkraft-tech/compose-action/graph/badge.svg?token=90JXB7EIMA)](https://codecov.io/gh/hoverkraft-tech/compose-action)\n\n\u003c!-- badges:end --\u003e\n\n\u003c!-- overview:start --\u003e\n\n## Overview\n\nThis action runs your compose file(s) and clean up before action finished\n\n### Action\n\nThe action will run `docker compose up` to start the services defined in the given compose file(s).\nThe compose file(s) can be specified using the `compose-file` input.\nSome extra options can be passed to the `docker compose up` command using the `up-flags` input.\n\n### Post hook\n\nOn post hook, the action will run `docker compose down` to clean up the services.\n\nLogs of the Docker Compose services are logged using GitHub `core.ts` API before the cleanup.\nThe log level can be set using the `services-log-level` input.\nThe 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.\n\nSome extra options can be passed to the `docker compose down` command using the `down-flags` input.\n\n\u003c!-- overview:end --\u003e\n\u003c!-- usage:start --\u003e\n\n## Usage\n\n```yaml\n- uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n  with:\n    # Additional options to pass to `docker` command.\n    docker-flags: \"\"\n\n    # Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd).\n    # Default: `./docker-compose.yml`\n    compose-file: ./docker-compose.yml\n\n    # Services to perform `docker compose up`.\n    services: \"\"\n\n    # Additional options to pass to `docker compose up` command.\n    up-flags: \"\"\n\n    # Additional options to pass to `docker compose down` command.\n    down-flags: \"\"\n\n    # Additional options to pass to `docker compose` command.\n    compose-flags: \"\"\n\n    # Current working directory\n    # Default: `${{ github.workspace }}`\n    cwd: ${{ github.workspace }}\n\n    # Compose version to use.\n    # If null (default), it will use the current installed version.\n    # If \"latest\", it will install the latest version.\n    compose-version: \"\"\n\n    # The log level used for Docker Compose service logs.\n    # Can be one of \"debug\", \"info\".\n    #\n    # Default: `debug`\n    services-log-level: debug\n\n    # The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose).\n    # Default: `${{ github.token }}`\n    github-token: ${{ github.token }}\n```\n\n\u003c!-- usage:end --\u003e\n\n\u003c!-- inputs:start --\u003e\n\n## Inputs\n\n| **Input**                | **Description**                                                                                                            | **Required** | **Default**               |\n| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------- |\n| **`docker-flags`**       | Additional options to pass to `docker` command.                                                                            | **false**    | -                         |\n| **`compose-file`**       | Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd). | **false**    | `./docker-compose.yml`    |\n| **`services`**           | Services to perform `docker compose up`.                                                                                   | **false**    | -                         |\n| **`up-flags`**           | Additional options to pass to `docker compose up` command.                                                                 | **false**    | -                         |\n| **`down-flags`**         | Additional options to pass to `docker compose down` command.                                                               | **false**    | -                         |\n| **`compose-flags`**      | Additional options to pass to `docker compose` command.                                                                    | **false**    | -                         |\n| **`cwd`**                | Current working directory                                                                                                  | **false**    | `${{ github.workspace }}` |\n| **`compose-version`**    | Compose version to use.                                                                                                    | **false**    | -                         |\n|                          | If null (default), it will use the current installed version.                                                              |              |                           |\n|                          | If \"latest\", it will install the latest version.                                                                           |              |                           |\n| **`services-log-level`** | The log level used for Docker Compose service logs.                                                                        | **false**    | `debug`                   |\n|                          | Can be one of \"debug\", \"info\".                                                                                             |              |                           |\n| **`github-token`**       | The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose).                   | **false**    | `${{ github.token }}`     |\n\n\u003c!-- inputs:end --\u003e\n\n\u003c!-- secrets:start --\u003e\n\u003c!-- secrets:end --\u003e\n\n\u003c!-- outputs:start --\u003e\n\u003c!-- outputs:end --\u003e\n\n\u003c!-- examples:start --\u003e\n\n## Examples\n\n### Example using in a full workflow\n\n```yaml\nname: Docker Compose Action\n\non: [push]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v4.2.2\n\n      - name: Run docker compose\n        uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n        with:\n          compose-file: \"./docker/docker-compose.yml\"\n\n      - name: Execute tests in the running services\n        run: |\n          docker compose exec test-app pytest\n```\n\n### Example Using environment variables\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4.2.2\n  - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n    with:\n      compose-file: \"./docker/docker-compose.yml\"\n    env:\n      CUSTOM_VARIABLE: \"test\"\n```\n\n### Example using `services`\n\nPerform `docker compose up` to some given service instead of all of them\n\n```yaml\nsteps:\n  # need checkout before using compose-action\n  - uses: actions/checkout@v3\n  - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n    with:\n      compose-file: \"./docker/docker-compose.yml\"\n      services: |\n        helloworld2\n        helloworld3\n```\n\n### Example using `up-flags`\n\nSpecify flags to pass to the `docker compose up`.\n\nDefault is none.\n\nCan be used to pass the `--build` flag, for example, if you want persistent volumes to be deleted as well during cleanup.\n\nA full list of flags can be found in the [Docker compose up documentation](https://docs.docker.com/compose/reference/up/).\n\n### Example using `down-flags`\n\nSpecify flags to pass to the `docker compose down` command during cleanup.\n\nDefault is none.\n\nCan be used to pass the want persistent volumes to be deleted as well during cleanup.\n\nA full list of flags can be found in the [Docker compose down documentation](https://docs.docker.com/compose/reference/down/).\n\n### Example using `compose-flags`\n\nSpecify flags to pass to the `docker compose` command. Default is none.\n\nA full list of flags can be found in the [Docker compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).\n\n```yaml\nsteps:\n  # need checkout before using compose-action\n  - uses: actions/checkout@v3\n  - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n    with:\n      compose-file: \"./docker/docker-compose.yml\"\n      compose-flags: \"--profile profile-1\"\n```\n\nSpecify multiple compose files to use with the `docker compose` command.\n\nThis is useful when you have a base compose file and additional files for different environments or configurations.\n\n```yaml\nsteps:\n  # need checkout before using compose-action\n  - uses: actions/checkout@v3\n  - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 # v2.4.3\n    with:\n      compose-file: |\n        ./docker/docker-compose.yml\n        ./docker/docker-compose.ci.yml\n```\n\n\u003c!-- examples:end --\u003e\n\n\u003c!-- contributing:start --\u003e\n\n## Contributing\n\nContributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/compose-action/blob/main/CONTRIBUTING.md) for more details.\n\n\u003c!-- contributing:end --\u003e\n\n\u003c!-- security:start --\u003e\n\u003c!-- security:end --\u003e\n\n\u003c!-- license:start --\u003e\n\n## License\n\nThis project is licensed under the MIT License.\n\nSPDX-License-Identifier: MIT\n\nCopyright © 2026 hoverkraft\n\nFor more details, see the [license](http://choosealicense.com/licenses/mit/).\n\n\u003c!-- license:end --\u003e\n\n\u003c!-- generated:start --\u003e\n\n---\n\nThis documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).\n\n\u003c!-- generated:end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverkraft-tech%2Fcompose-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoverkraft-tech%2Fcompose-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoverkraft-tech%2Fcompose-action/lists"}