Compare commits

...

98 Commits
v2.0.2 ... main

Author SHA1 Message Date
hoverkraft-bot[bot]
05da55b2bb docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-02 08:49:54 +00:00
dependabot[bot]
d66307f735 chore(deps-dev): bump @ts-dev-tools/core
Bumps the npm-dev-dependencies group with 1 update:
- [@ts-dev-tools/core](https://github.com/escemi-tech/ts-dev-tools).

---
updated-dependencies:
- dependency-name: "@ts-dev-tools/core"
  dependency-version: 1.9.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-02 09:45:52 +01:00
dependabot[bot]
d6adfd48d3 chore(deps): bump the github-actions-dependencies group with 8 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Prepare release / release (push) Has been cancelled
Internal - Main - Continuous Integration / prepare-docs (push) Has been cancelled
Internal - Main - Continuous Integration / sync-docs (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 8 updates:

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml
  dependency-version: 0.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml
  dependency-version: 0.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-28 13:31:19 +01:00
hoverkraft-bot[bot]
3086829978 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-22 09:56:22 +00:00
hoverkraft-bot[bot]
9dc1f1e6ec ci: prepare release configuration
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-22 09:52:44 +00:00
dependabot[bot]
50a58965b3 chore(deps): bump the github-actions-dependencies group across 1 directory with 10 updates
Bumps the github-actions-dependencies group with 10 updates in the / directory:
---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml
  dependency-version: 0.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml
  dependency-version: 0.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml
  dependency-version: 0.31.4
  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.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml
  dependency-version: 0.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml
  dependency-version: 0.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml
  dependency-version: 0.31.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-12-22 10:52:09 +01:00
dependabot[bot]
b7900497f3 chore(deps): bump @actions/core in the actions-dependencies group
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Internal - Main - Continuous Integration / sync-docs (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the actions-dependencies group with 1 update:
- [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core).

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-12-15 09:05:11 +01:00
dependabot[bot]
089c512a98 chore(deps-dev): bump @ts-dev-tools/core
Some checks failed
Mark stale issues and pull requests / main (push) Has been cancelled
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Internal - Main - Continuous Integration / sync-docs (push) Has been cancelled
Bumps the npm-dev-dependencies group with 1 update:
- [@ts-dev-tools/core](https://github.com/escemi-tech/ts-dev-tools)

Updates `@ts-dev-tools/core` from 1.9.7 to 1.9.11
- [Release notes](https://github.com/escemi-tech/ts-dev-tools/releases)

---
updated-dependencies:
- dependency-name: "@ts-dev-tools/core"
  dependency-version: 1.9.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-05 18:18:50 +01:00
hoverkraft-bot[bot]
b63643de22 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-04 16:06:17 +00:00
dependabot[bot]
248470ecc5 chore(deps): bump the github-actions-dependencies group across 1 directory with 10 updates
Bumps the github-actions-dependencies group with 10 updates in the / directory:

Updates `actions/checkout` from 6.0.0 to 6.0.1
Updates `docker/setup-docker-action` from 4.5.0 to 4.6.0
Updates `hoverkraft-tech/ci-github-nodejs` from 0.20.0 to 0.20.6
Updates `hoverkraft-tech/ci-github-common` from 0.30.1 to 0.31.3

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: docker/setup-docker-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.20.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml
  dependency-version: 0.20.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml
  dependency-version: 0.31.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 16:11:42 +01:00
copilot-swe-agent[bot]
5d59cf29d8 fix: format docker-compose error objects as readable messages
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-12-04 15:55:12 +01:00
Emilien Escalle
e9bb59d794 chore: add agents instructions
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-12-04 14:41:44 +01:00
hoverkraft-bot[bot]
6724232075 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-22 20:44:01 +00:00
Emilien Escalle
f1193bc509 ci: enable codecov for test coverage
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-11-22 21:38:39 +01:00
dependabot[bot]
175bf4a061 chore(deps): bump the github-actions-dependencies group across 1 directory with 10 updates
Bumps the github-actions-dependencies group with 10 updates in the / directory:

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: actions/create-github-app-token
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml
  dependency-version: 0.30.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-11-22 21:32:49 +01:00
dependabot[bot]
9974256204 chore(deps-dev): bump js-yaml from 3.14.1 to 3.14.2
Some checks failed
Mark stale issues and pull requests / main (push) Has been cancelled
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Internal - Main - Continuous Integration / sync-docs (push) Has been cancelled
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 20:05:10 +01:00
dependabot[bot]
2c655a3602 chore(deps): bump @octokit/action from 8.0.2 to 8.0.4
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Internal - Main - Continuous Integration / sync-docs (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps [@octokit/action](https://github.com/octokit/action.js) from 8.0.2 to 8.0.4.
- [Release notes](https://github.com/octokit/action.js/releases)
- [Commits](https://github.com/octokit/action.js/compare/v8.0.2...v8.0.4)

---
updated-dependencies:
- dependency-name: "@octokit/action"
  dependency-version: 8.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-05 14:41:08 +01:00
dependabot[bot]
2feed3a086 chore(deps): bump the github-actions-dependencies group with 3 updates
Bumps the github-actions-dependencies group with 3 updates:
- [docker/setup-docker-action](https://github.com/docker/setup-docker-action)
- [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs)
- [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common)

---
updated-dependencies:
- dependency-name: docker/setup-docker-action
  dependency-version: 4.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-11-05 14:22:40 +01:00
Emilien Escalle
0c4c8ad01b chore: improve devcontainer config
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-11-05 10:29:34 +00:00
Emilien Escalle
0683632a02 chore: improve devcontainer config
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-11-05 10:14:00 +00:00
hoverkraft-bot[bot]
d626027cf5 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-31 07:07:24 +00:00
dependabot[bot]
6e0a504521 chore(deps): bump the github-actions-dependencies group with 2 updates
Bumps the github-actions-dependencies group with 2 updates:
- [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs)
- [actions/upload-artifact](https://github.com/actions/upload-artifact)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.16.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 08:03:15 +01:00
dependabot[bot]
ccd64b05f8 chore(deps): bump the github-actions-dependencies group with 3 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 3 updates:
- [docker/setup-docker-action](https://github.com/docker/setup-docker-action)
- [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs)
- [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).

---
updated-dependencies:
- dependency-name: docker/setup-docker-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-17 09:53:59 +02:00
hoverkraft-bot[bot]
ee80f8a42f docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-13 19:23:00 +00:00
Emilien Escalle
3846bcd61d chore: remove useless ghadocs config
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-10-13 21:12:03 +02:00
dependabot[bot]
97c255ba62 chore(deps): bump hoverkraft-tech/ci-github-nodejs
Bumps the github-actions-dependencies group with 1 update:
- [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs).

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 21:11:29 +02:00
dependabot[bot]
8ed9acf0e1 chore(deps): bump hoverkraft-tech/ci-dokumentor
Bumps the github-actions-dependencies group with 1 update:

- [hoverkraft-tech/ci-dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-dokumentor
  dependency-version: 0.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 20:07:00 +02:00
dependabot[bot]
ef7568e9dc chore(deps): bump the github-actions-dependencies group with 2 updates
Bumps the github-actions-dependencies group with 2 updates:
-[hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common)
- [hoverkraft-tech/ci-dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.26.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.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 18:58:34 +02:00
dependabot[bot]
fff732cbb3 chore(deps-dev): bump the npm-dev-dependencies group across 1 directory with 2 updates
Bumps the npm-dev-dependencies group with 2 updates in the / directory:
- [@ts-dev-tools/core](https://github.com/escemi-tech/ts-dev-tools)
- [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc).

---
updated-dependencies:
- dependency-name: "@ts-dev-tools/core"
  dependency-version: 1.9.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
- dependency-name: eslint-plugin-jsonc
  dependency-version: 2.21.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-10-13 18:46:00 +02:00
hoverkraft-bot[bot]
b9f10db4fd docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-30 13:49:33 +00:00
dependabot[bot]
b716db5b71 chore(deps): bump hoverkraft-tech/ci-dokumentor
Bumps the github-actions-dependencies group with 1 update:
[hoverkraft-tech/ci-dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-dokumentor
  dependency-version: 0.1.2
  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 15:31:16 +02:00
copilot-swe-agent[bot]
88b85ef80e docs: improve compose-flags example
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-09-30 13:11:11 +02:00
dependabot[bot]
ab0fa7d95d chore(deps): bump docker-compose from 1.2.0 to 1.3.0
Bumps [docker-compose](https://github.com/PDMLab/docker-compose) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/PDMLab/docker-compose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PDMLab/docker-compose/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: docker-compose
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-09-30 13:06:28 +02:00
dependabot[bot]
82f56cc549 chore(deps): bump docker-compose from 1.2.0 to 1.3.0
Bumps [docker-compose](https://github.com/PDMLab/docker-compose) from 1.2.0 to 1.3.0.
- [Changelog](https://github.com/PDMLab/docker-compose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PDMLab/docker-compose/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: docker-compose
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-30 13:06:28 +02:00
dependabot[bot]
650d8e8740 chore(deps-dev): bump the npm-dev-dependencies group across 1 directory with 2 updates
Bumps the npm-dev-dependencies group with 2 updates in the / directory:
[@ts-dev-tools/core](https://github.com/escemi-tech/ts-dev-tools)
and [@vercel/ncc](https://github.com/vercel/ncc).

---
updated-dependencies:
- dependency-name: "@ts-dev-tools/core"
  dependency-version: 1.9.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
- dependency-name: "@vercel/ncc"
  dependency-version: 0.38.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-30 12:56:58 +02:00
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
hoverkraft-bot[bot]
57a2375c11 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-29 19:51:12 +00:00
Emilien Escalle
492e297766 ci: use ci-dokumentor
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-09-29 21:46:55 +02:00
dependabot[bot]
bc82ca5e29 chore(deps): bump the github-actions-dependencies group with 2 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 2 updates: [actions/github-script](https://github.com/actions/github-script) and [actions/publish-action](https://github.com/actions/publish-action).


Updates `actions/github-script` from 7.0.1 to 8.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](60a0d83039...ed597411d8)

Updates `actions/publish-action` from 0.3.0 to 0.4.0
- [Commits](f784495ce7...23f4c6f126)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/publish-action
  dependency-version: 0.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-05 07:09:45 +02:00
dependabot[bot]
8d5a9fea6b chore(deps): bump hoverkraft-tech/ci-github-nodejs
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.14.0 to 0.14.1
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](284b3a2256...1d00c9eb28)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-22 07:27:25 +02:00
dependabot[bot]
0ec2d95d2f chore(deps-dev): bump @ts-dev-tools/core
Some checks failed
Mark stale issues and pull requests / main (push) Has been cancelled
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Bumps the npm-dev-dependencies group with 1 update: [@ts-dev-tools/core](https://github.com/escemi-tech/ts-dev-tools).


Updates `@ts-dev-tools/core` from 1.6.2 to 1.9.5
- [Release notes](https://github.com/escemi-tech/ts-dev-tools/releases)
- [Commits](https://github.com/escemi-tech/ts-dev-tools/compare/@ts-dev-tools/core@1.6.2...@ts-dev-tools/core@1.9.5)

---
updated-dependencies:
- dependency-name: "@ts-dev-tools/core"
  dependency-version: 1.9.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 18:30:49 +02:00
dependabot[bot]
a5e6b53f31 chore(deps): bump the github-actions-dependencies group with 2 updates
Bumps the github-actions-dependencies group with 2 updates: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs) and [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.13.0 to 0.14.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](51de90c148...284b3a2256)

Updates `hoverkraft-tech/ci-github-common` from 0.23.1 to 0.24.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](6857ef6d10...b4883995e1)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 15:36:28 +02:00
dependabot[bot]
3b8348c096 chore(deps): bump the github-actions-dependencies group across 1 directory with 4 updates
Bumps the github-actions-dependencies group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs), [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).

Updates `actions/checkout` from 4.2.2 to 5.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

Updates `hoverkraft-tech/ci-github-nodejs` from 0.12.0 to 0.13.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](77c905a257...51de90c148)

Updates `hoverkraft-tech/ci-github-common` from 0.23.0 to 0.23.1
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](9a3d71ca9f...6857ef6d10)

Updates `actions/create-github-app-token` from 2.0.6 to 2.1.1
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](df432ceedc...a8d6161485)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.23.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.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-08-19 14:41:15 +02:00
dependabot[bot]
1c0bf1362e chore(deps): bump super-linter/super-linter
Bumps the docker-dependencies group with 1 update in the / directory: [super-linter/super-linter](https://github.com/super-linter/super-linter).


Updates `super-linter/super-linter` from slim-v7 to slim-v8
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/v7...v8)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: slim-v8
  dependency-type: direct:production
  dependency-group: docker-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 14:22:22 +02:00
dependabot[bot]
40041ff1b9 chore(deps): bump hoverkraft-tech/ci-github-common
Some checks failed
Mark stale issues and pull requests / main (push) Has been cancelled
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-common` from 0.22.3 to 0.23.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](95664be4ec...9a3d71ca9f)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-29 22:30:58 +02:00
hoverkraft-bot[bot]
59a51a1b9c docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-23 09:17:31 +00:00
Emilien Escalle
2daef55cd7 chore: branding cleaning
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-23 11:12:58 +02:00
Emilien Escalle
4e1d048b27 docs: add example for multiple compose files in README
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-20 15:44:17 +02:00
Emilien Escalle
d885714cc1 docs: add example for multiple compose files
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-20 12:25:10 +02:00
hoverkraft-bot[bot]
329c851e91 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-20 10:12:58 +00:00
Emilien Escalle
213193f269 fix: add missing input in action manifest
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-20 12:07:11 +02:00
dvag-gloeckner-daniel
7098fdc4f5 feat: make service log level configurable
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-19 13:03:41 +02:00
Emilien Escalle
a035f13e41 feat: upgrade dependencies
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-06-19 12:01:03 +02:00
dependabot[bot]
ad8e0e414a chore(deps): bump @octokit/action from 8.0.1 to 8.0.2
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps [@octokit/action](https://github.com/octokit/action.js) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/octokit/action.js/releases)
- [Commits](https://github.com/octokit/action.js/compare/v8.0.1...v8.0.2)

---
updated-dependencies:
- dependency-name: "@octokit/action"
  dependency-version: 8.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 14:04:55 +02:00
dependabot[bot]
15ce64a555 chore(deps): bump hoverkraft-tech/ci-github-nodejs
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.11.0 to 0.12.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](5c1010a914...77c905a257)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 09:51:32 +02:00
dependabot[bot]
c80b846497 chore(deps): bump @octokit/action from 7.0.2 to 8.0.1
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps [@octokit/action](https://github.com/octokit/action.js) from 7.0.2 to 8.0.1.
- [Release notes](https://github.com/octokit/action.js/releases)
- [Commits](https://github.com/octokit/action.js/compare/v7.0.2...v8.0.1)

---
updated-dependencies:
- dependency-name: "@octokit/action"
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-23 21:54:42 +02:00
dependabot[bot]
f16481cead chore(deps): bump @actions/github in the actions-dependencies group
Some checks failed
Mark stale issues and pull requests / main (push) Has been cancelled
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Bumps the actions-dependencies group with 1 update: [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github).

Updates `@actions/github` from 6.0.0 to 6.0.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-05-11 20:55:02 +02:00
dependabot[bot]
3a740fb279 chore(deps): bump actions/create-github-app-token
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `actions/create-github-app-token` from 2.0.3 to 2.0.6
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](30bf6253fa...df432ceedc)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-09 07:01:19 +02:00
dependabot[bot]
c4d1d8e06d chore(deps): bump the github-actions-dependencies group across 1 directory with 3 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 3 updates in the / directory: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs), [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.10.0 to 0.11.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](0c281f43dd...5c1010a914)

Updates `hoverkraft-tech/ci-github-common` from 0.22.2 to 0.22.3
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](abd5469ef9...95664be4ec)

Updates `actions/create-github-app-token` from 2.0.2 to 2.0.3
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](3ff1caaa28...30bf6253fa)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.22.3
  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.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 07:47:40 +02:00
Emilien Escalle
0544eebad5 chore: fix ci
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-05-02 07:36:07 +02:00
dependabot[bot]
3212ac38f2 chore(deps): bump hoverkraft-tech/ci-github-common
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-common` from 0.22.0 to 0.22.2
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](198d391bd7...abd5469ef9)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-version: 0.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 07:45:55 +02:00
dependabot[bot]
39497ec4dd chore(deps): bump @octokit/action from 7.0.1 to 7.0.2
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps [@octokit/action](https://github.com/octokit/action.js) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/octokit/action.js/releases)
- [Commits](https://github.com/octokit/action.js/compare/v7.0.1...v7.0.2)

---
updated-dependencies:
- dependency-name: "@octokit/action"
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 07:24:39 +02:00
dependabot[bot]
29a0d4b13c chore(deps): bump actions/create-github-app-token
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `actions/create-github-app-token` from 1.12.0 to 2.0.2
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](d72941d797...3ff1caaa28)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 2.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 09:18:36 +02:00
dependabot[bot]
547846f8fb chore(deps): bump the github-actions-dependencies group with 2 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Bumps the github-actions-dependencies group with 2 updates: [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `hoverkraft-tech/ci-github-common` from 0.20.0 to 0.22.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](edc1e53751...198d391bd7)

Updates `actions/create-github-app-token` from 1.11.7 to 1.12.0
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](af35edadc0...d72941d797)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 07:06:45 +01:00
Emilien Escalle
14ab51d9bf feat: upgrade dependencies
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-03-26 19:37:07 +01:00
dependabot[bot]
714591cd55 chore(deps): bump docker-compose from 1.1.1 to 1.2.0
Bumps [docker-compose](https://github.com/PDMLab/docker-compose) from 1.1.1 to 1.2.0.
- [Changelog](https://github.com/PDMLab/docker-compose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PDMLab/docker-compose/compare/v1.1.1...v1.2.0)

---
updated-dependencies:
- dependency-name: docker-compose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-03-26 19:13:18 +01:00
dependabot[bot]
86e13c8bea chore(deps): bump the github-actions-dependencies group with 2 updates
Bumps the github-actions-dependencies group with 2 updates: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs) and [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).

Updates `hoverkraft-tech/ci-github-nodejs` from 0.9.0 to 0.10.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-nodejs/compare/0.9.0...0.10.0)

Updates `hoverkraft-tech/ci-github-common` from 0.18.0 to 0.20.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-common/compare/0.18.0...0.20.0)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-03-26 19:02:19 +01:00
dependabot[bot]
1d127c94a3 chore(deps): bump the github-actions-dependencies group with 2 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the github-actions-dependencies group with 2 updates: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs) and [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.8.1 to 0.9.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-nodejs/compare/0.8.1...0.9.0)

Updates `hoverkraft-tech/ci-github-common` from 0.17.0 to 0.18.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-common/compare/0.17.0...0.18.0)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 10:59:34 +01:00
dependabot[bot]
47ef9a3b5f chore(deps): bump hoverkraft-tech/ci-github-nodejs
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.8.0 to 0.8.1
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-nodejs/compare/0.8.0...0.8.1)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 07:56:09 +01:00
Emilien Escalle
63b042489c ci: add docker-compose to dependencies update
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-02-25 20:53:00 +01:00
dependabot[bot]
391b044006 chore(deps): bump @octokit/action from 7.0.0 to 7.0.1
Some checks are pending
Internal - Main - Continuous Integration / ci (push) Waiting to run
Internal - Main - Continuous Integration / generate-readme (push) Blocked by required conditions
Bumps [@octokit/action](https://github.com/octokit/action.js) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/octokit/action.js/releases)
- [Commits](https://github.com/octokit/action.js/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: "@octokit/action"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-21 07:34:17 +01:00
dependabot[bot]
2799547b71 chore(deps): bump docker-compose from 1.1.0 to 1.1.1
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps [docker-compose](https://github.com/PDMLab/docker-compose) from 1.1.0 to 1.1.1.
- [Changelog](https://github.com/PDMLab/docker-compose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PDMLab/docker-compose/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: docker-compose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 14:01:22 +01:00
dependabot[bot]
f9146533dc chore(deps): bump hoverkraft-tech/ci-github-common
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-common` from 0.16.1 to 0.17.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-common/compare/0.16.1...0.17.0)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 08:43:39 +01:00
Emilien Escalle
969f2aa45e ci: add Release new action version workflow
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-02-05 10:39:54 +01:00
dependabot[bot]
8be2d741e8 chore(deps): bump the github-actions-dependencies group with 2 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the github-actions-dependencies group with 2 updates: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs) and [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.7.0 to 0.8.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-nodejs/compare/0.7.0...0.8.0)

Updates `hoverkraft-tech/ci-github-common` from 0.16.0 to 0.16.1
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-common/compare/0.16.0...0.16.1)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-30 21:14:11 +01:00
github-actions[bot]
d98be6ed72 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-30 20:05:22 +00:00
Emilien Escalle
2c587abdb1 feat: add docker flags input
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-30 20:58:36 +01:00
Emilien Escalle
5bc973d473 fix: npm security issue 2025-01-30 20:58:36 +01:00
Emilien Escalle
99765016ef docs; use docker compose wording instead of docker-compose 2025-01-30 20:58:36 +01:00
Emilien Escalle
0807b14987 fix: print docker compose output to debug only
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-30 20:45:35 +01:00
Emilien Escalle
765986dd3e
docs: add ref link to debug mode
Some checks are pending
Internal - Main - Continuous Integration / ci (push) Waiting to run
Internal - Main - Continuous Integration / generate-readme (push) Blocked by required conditions
Signed-off-by: Emilien Escalle <neilime@users.noreply.github.com>
2025-01-30 10:04:38 +01:00
dependabot[bot]
ad6e7b37dc chore(deps): bump the actions-dependencies group across 1 directory with 2 updates
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the actions-dependencies group with 2 updates in the / directory: [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) and [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache).

Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@actions/tool-cache` from 2.0.1 to 2.0.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-dependencies
- dependency-name: "@actions/tool-cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-20 17:44:50 +01:00
Emilien Escalle
9575d402e7 chore: set prover version for @ts-dev-tools/core
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-18 20:09:01 +01:00
Emilien Escalle
9d708db1d3 chore: set node version according to official javascript action
Some checks are pending
Internal - Main - Continuous Integration / ci (push) Waiting to run
Internal - Main - Continuous Integration / generate-readme (push) Blocked by required conditions
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-18 16:40:02 +01:00
Emilien Escalle
c4adfb9283 chore: move @ts-dev-tools to dev deps
Some checks are pending
Internal - Main - Continuous Integration / ci (push) Waiting to run
Internal - Main - Continuous Integration / generate-readme (push) Blocked by required conditions
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2025-01-17 21:37:08 +01:00
dependabot[bot]
e31e0d5fed chore(deps-dev): bump eslint-plugin-github
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the npm-dev-dependencies group with 1 update: [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `eslint-plugin-github` from 5.1.4 to 5.1.5
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.1.4...v5.1.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-10 08:03:36 +01:00
dependabot[bot]
ecfe7fa732 chore(deps): bump hoverkraft-tech/ci-github-common
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-common](https://github.com/hoverkraft-tech/ci-github-common).


Updates `hoverkraft-tech/ci-github-common` from 0.15.0 to 0.16.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-common/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-common/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-common
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-10 08:03:18 +01:00
dependabot[bot]
394b874fd4 chore(deps-dev): bump eslint-plugin-github
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the npm-dev-dependencies group with 1 update: [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `eslint-plugin-github` from 5.1.3 to 5.1.4
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.1.3...v5.1.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-06 07:43:44 +01:00
dependabot[bot]
6fcee61d3e chore(deps-dev): bump eslint-plugin-github
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / generate-readme (push) Has been cancelled
Bumps the npm-dev-dependencies group with 1 update: [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `eslint-plugin-github` from 5.1.1 to 5.1.3
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.1.1...v5.1.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-29 07:38:28 +01:00
dependabot[bot]
d31b644c8e chore(deps-dev): bump the npm-dev-dependencies group with 3 updates
Bumps the npm-dev-dependencies group with 3 updates: [@vercel/ncc](https://github.com/vercel/ncc), [eslint-plugin-github](https://github.com/github/eslint-plugin-github) and [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc).


Updates `@vercel/ncc` from 0.38.2 to 0.38.3
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.2...0.38.3)

Updates `eslint-plugin-github` from 5.0.2 to 5.1.1
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.0.2...v5.1.1)

Updates `eslint-plugin-jsonc` from 2.18.1 to 2.18.2
- [Release notes](https://github.com/ota-meshi/eslint-plugin-jsonc/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-jsonc/compare/v2.18.1...v2.18.2)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dev-dependencies
- dependency-name: eslint-plugin-jsonc
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 07:11:38 +01:00
Emilien Escalle
59fb88b48c chore(docs): fix lint issues
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2024-11-12 14:32:30 +01:00
dependabot[bot]
22b27bf490 chore(deps-dev): bump eslint-plugin-jsonc
Bumps the npm-dev-dependencies group with 1 update: [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc).


Updates `eslint-plugin-jsonc` from 2.17.0 to 2.18.1
- [Release notes](https://github.com/ota-meshi/eslint-plugin-jsonc/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-jsonc/compare/v2.17.0...v2.18.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsonc
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-12 13:43:55 +01:00
dependabot[bot]
307835b9d9 chore(deps-dev): bump eslint-plugin-jsonc
Bumps the npm-dev-dependencies group with 1 update: [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc).


Updates `eslint-plugin-jsonc` from 2.16.0 to 2.17.0
- [Release notes](https://github.com/ota-meshi/eslint-plugin-jsonc/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-jsonc/compare/v2.16.0...v2.17.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsonc
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-08 07:59:30 +01:00
github-actions[bot]
3936061ac3 docs: update actions and workflows documentation
[skip ci]

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-23 15:36:15 +00:00
Emilien Escalle
cf721e686a feat: support compose version
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2024-10-23 17:29:26 +02:00
dependabot[bot]
e7df5df997 chore(deps): bump hoverkraft-tech/ci-github-nodejs
Bumps the github-actions-dependencies group with 1 update: [hoverkraft-tech/ci-github-nodejs](https://github.com/hoverkraft-tech/ci-github-nodejs).


Updates `hoverkraft-tech/ci-github-nodejs` from 0.6.0 to 0.7.0
- [Release notes](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
- [Commits](https://github.com/hoverkraft-tech/ci-github-nodejs/compare/0.6.0...0.7.0)

---
updated-dependencies:
- dependency-name: hoverkraft-tech/ci-github-nodejs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-18 08:24:20 +02:00
dependabot[bot]
1a5b014fa4 chore(deps): bump docker-compose from 0.24.8 to 1.1.0
Bumps [docker-compose](https://github.com/PDMLab/docker-compose) from 0.24.8 to 1.1.0.
- [Changelog](https://github.com/PDMLab/docker-compose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PDMLab/docker-compose/compare/v0.24.8...v1.1.0)

---
updated-dependencies:
- dependency-name: docker-compose
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 11:02:51 +02:00
dependabot[bot]
3672da1299 chore(deps-dev): bump @vercel/ncc in the npm-dev-dependencies group
Bumps the npm-dev-dependencies group with 1 update: [@vercel/ncc](https://github.com/vercel/ncc).

Updates `@vercel/ncc` from 0.38.1 to 0.38.2
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.2)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
2024-09-27 08:42:49 +02:00
62 changed files with 50403 additions and 9671 deletions

View File

@ -1,41 +1,29 @@
{
"name": "GitHub Actions (TypeScript)",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
"postCreateCommand": "npm install",
"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"bierner.markdown-preview-github-styles",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"github.copilot",
"github.copilot-chat",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"me-dutour-mathieu.vscode-github-actions",
"redhat.vscode-yaml",
"rvest.vs-code-prettier-eslint",
"yzhang.markdown-all-in-one"
],
"settings": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.formatOnSave": true,
"markdown.extension.list.indentationSize": "adaptive",
"markdown.extension.italic.indicator": "_",
"markdown.extension.orderedList.marker": "one"
}
}
"name": "Debian",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"remoteEnv": {
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-contrib/features/prettier:1": {}
"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens",
"github.copilot",
"github.copilot-chat",
"github.vscode-github-actions",
"ms-vscode.makefile-tools",
"bierner.markdown-preview-github-styles",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
}
}

View File

@ -1,17 +0,0 @@
{
"paths": {
"action": "action.yml",
"readme": "README.md"
},
"show_logo": true,
"versioning": {
"enabled": true,
"override": "",
"prefix": "v",
"branch": "main"
},
"owner": "hoverkraft-tech",
"repo": "compose-action",
"title_prefix": "GitHub Action: ",
"prettier": true
}

View File

@ -1,9 +1,9 @@
---
name: Bug report
about: Create a bug report
title: ''
title: ""
labels: bug, needs triage
assignees: ''
assignees: ""
---
<!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 --->

View File

@ -1,9 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
title: ""
labels: ""
assignees: ""
---
**Is your feature request related to a problem? Please describe.** A clear and

View File

@ -12,23 +12,10 @@ updates:
patterns:
- "*"
- package-ecosystem: npm
directory: "/"
open-pull-requests-limit: 20
versioning-strategy: widen
schedule:
interval: weekly
day: friday
time: "04:00"
groups:
actions-dependencies:
patterns:
- "@actions/*"
npm-dev-dependencies:
dependency-type: development
- package-ecosystem: docker
directory: "/test"
directories:
- "/test"
- "/"
open-pull-requests-limit: 20
schedule:
interval: weekly
@ -38,3 +25,38 @@ updates:
docker-dependencies:
patterns:
- "*"
- package-ecosystem: docker-compose
directory: "/test"
open-pull-requests-limit: 20
schedule:
interval: weekly
day: friday
time: "04:00"
groups:
docker-compose-dependencies:
patterns:
- "*"
- package-ecosystem: npm
directory: "/"
open-pull-requests-limit: 20
versioning-strategy: increase
schedule:
interval: weekly
day: friday
time: "04:00"
groups:
npm-dev-dependencies:
dependency-type: development
actions-dependencies:
patterns:
- "@actions/*"
- package-ecosystem: "devcontainers"
open-pull-requests-limit: 20
directory: "/"
schedule:
interval: weekly
day: friday
time: "04:00"

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="43%" height="43%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #ffffff;">
<title>anchor</title>
<circle cx="12" cy="5" r="3"></circle>
<line x1="12" y1="22" x2="12" y2="8"></line>
<path d="M5 12H2a10 10 0 0 0 20 0h-3"></path>
</svg>

Before

Width:  |  Height:  |  Size: 382 B

View File

@ -1,12 +0,0 @@
<!-- 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'
```

View File

@ -1,16 +0,0 @@
<!-- 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
```

View File

@ -1,7 +0,0 @@
<!-- 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/).

View File

@ -1,8 +0,0 @@
<!-- 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/).

View File

@ -1,18 +0,0 @@
<!-- 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
```

3
.github/linters/.jscpd.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**"]
}

67
.github/logo.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 3.5 MiB

30
.github/release-config.yml vendored Normal file
View File

@ -0,0 +1,30 @@
---
template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
name-template: "Version $RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
tag-prefix: ""
prerelease-identifier: "rc"
version-resolver:
major:
labels:
- "release-major"
minor:
labels:
- "release-minor"
patch:
labels:
- "release-patch"
default: patch
autolabeler:
- label: "release-major"
title:
- "/^BREAKING CHANGE:/"
- "/^\\w+!:/"
- "/^\\w+\\(.+\\)!:/"
- label: "release-minor"
title:
- "/^feat:/"
- "/^feat\\(.+\\):/"

24479
.github/social-preview.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 3.5 MiB

View File

@ -3,177 +3,230 @@ name: Internal - Tests for action
on:
workflow_call:
permissions:
contents: read
permissions: {}
jobs:
test-action-with-services:
test-action:
runs-on: ubuntu-latest
name: Test with services
name: ${{ matrix.name }} - ${{ matrix.assertion-name }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: Given multiple services when filtering services
assertion-name: "Then only expected services run"
compose-file: ./test/docker-compose.yml
services: |
service-b
service-c
assertion: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
- name: Given compose file when applying down flags
assertion-name: "Then teardown honors down flags"
compose-file: ./test/docker-compose.yml
down-flags: "--volumes"
assertion: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 || (echo "Service service-a is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 && echo "Service service-b should not be running without profile" && exit 1) || true
(docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 && echo "Service service-c should not be running without profile" && exit 1) || true
- name: Given compose profile when passing compose flags
assertion-name: "Then the requested profile is active"
compose-file: ./test/docker-compose.yml
compose-flags: "--profile profile-1"
down-flags: "--volumes"
assertion: |
docker compose -f ./test/docker-compose.yml -p profile-1 ps || (echo "Profile not used" && exit 1)
- name: Given image supplied via env when running action
assertion-name: "Then compose uses the provided env"
compose-file: ./test/docker-compose-with-env.yml
image-name: busybox
assertion: |
docker compose -f ./test/docker-compose-with-env.yml ps
docker compose -f ./test/docker-compose-with-env.yml ps | grep test-service-a-1 || (echo "Service service-a is not running" && exit 1)
- name: Given multiple compose files when selecting services
assertion-name: "Then only services from selection run"
compose-file: |
./test/docker-compose.yml
./test/docker-compose.ci.yml
services: |
service-b
service-d
assertion: |
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-d-1 || (echo "Service service-d is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
(docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-c-1 && echo "Unexpected service service-c is running" && exit 1) || true
- name: Given compose file in subdirectory when setting cwd
assertion-name: "Then only expected services run"
compose-file: docker-compose.yml
cwd: ./test
services: |
service-b
service-c
assertion: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
- name: Given absolute compose path when running action
assertion-name: "Then only expected services run"
compose-file: test/docker-compose.yml
use-absolute-path: true
services: |
service-b
service-c
assertion: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
- name: Given compose with multiple services when using abort-on-container-exit
assertion-name: "Then execution stops on container exit"
compose-file: test/docker-compose-web-mysql.yml
up-flags: "--build --abort-on-container-exit --exit-code-from=web"
assertion: |
WEB_EXIT_CODE=$(docker compose -f ./test/docker-compose-web-mysql.yml ps web --all --format json | jq ".ExitCode")
[ "$WEB_EXIT_CODE" == "0" ] || (echo "Web service did not exit successfully" && exit 1)
MYSQL_STATE=$(docker compose -f ./test/docker-compose-web-mysql.yml ps mysql --all --format json | jq -r ".State")
if [ "$MYSQL_STATE" = "running" ]; then
echo "MySQL service is still running"
exit 1
fi
- name: Given failing dependency when attaching dependencies
assertion-name: "Then failing service exits with code 1"
compose-file: test/docker-compose-fail.yml
up-flags: "--attach-dependencies"
assertion: |
EXIT_CODE=$(docker compose -f ./test/docker-compose-fail.yml ps service-a --all --format json | jq ".ExitCode")
[ "$EXIT_CODE" == "1" ] || (echo "Service service-a did not exit with code 1" && exit 1)
- name: Given compose version mismatch when requesting explicit version
assertion-name: "Then docker compose reports the requested version"
compose-file: ./test/docker-compose.yml
compose-version: "2.29.0"
expected-compose-version: "2.29.0"
ensure-version-mismatch: true
assertion: |
CURRENT_DOCKER_COMPOSE_VERSION=$(docker compose version --short)
echo "Current docker compose version: $CURRENT_DOCKER_COMPOSE_VERSION"
if [ "$CURRENT_DOCKER_COMPOSE_VERSION" != "$DOCKER_COMPOSE_VERSION" ]; then
echo "Docker compose version is not in $DOCKER_COMPOSE_VERSION version"
exit 1
fi
- name: Given compose version mismatch when requesting latest version
assertion-name: "Then docker compose reports the requested version"
compose-file: ./test/docker-compose.yml
compose-version: latest
fetch-latest-compose: true
ensure-version-mismatch: true
assertion: |
CURRENT_DOCKER_COMPOSE_VERSION=$(docker compose version --short)
echo "Current docker compose version: $CURRENT_DOCKER_COMPOSE_VERSION"
if [ "$CURRENT_DOCKER_COMPOSE_VERSION" != "$DOCKER_COMPOSE_VERSION" ]; then
echo "Docker compose version is not in $DOCKER_COMPOSE_VERSION version"
exit 1
fi
- name: Given custom docker context when providing docker flags
assertion-name: "Then docker compose uses that context"
compose-file: ./test/docker-compose.yml
compose-version: latest
docker-flags: "--context test-context"
docker-context: test-context
assertion: |
CURRENT_CONTEXT=$(docker context show)
if [ "$CURRENT_CONTEXT" != "test-context" ]; then
echo "Docker context is '$CURRENT_CONTEXT' instead of 'test-context'"
exit 1
fi
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 || (echo "Service service-a is not running under custom context" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 && echo "Service service-b should not be running without profile" && exit 1) || true
env:
DOCKER_COMPOSE_VERSION: ${{ matrix.expected-compose-version || '' }}
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
compose-file: "./test/docker-compose.yml"
services: |
service-b
service-c
persist-credentials: false
- name: "Assert: only expected services are running"
- name: Set up Docker context
if: ${{ matrix.docker-context }}
uses: docker/setup-docker-action@e61617a16c407a86262fb923c35a616ddbe070b3 # v4.6.0
with:
context: ${{ matrix.docker-context }}
- name: Resolve absolute compose path
if: ${{ matrix.use-absolute-path }}
id: compose-path
run: echo "absolute=${GITHUB_WORKSPACE}/${{ matrix.compose-file }}" >> "$GITHUB_OUTPUT"
- name: "Arrange: retrieve latest version of docker compose"
if: ${{ matrix.fetch-latest-compose }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const dockerComposeVersion = (await github.rest.repos.getLatestRelease({
owner: "docker",
repo: "compose",
})).data.tag_name.replace("v", "");
core.exportVariable('DOCKER_COMPOSE_VERSION', dockerComposeVersion);
- name: "Arrange: ensure original docker compose version is not the expected one"
if: ${{ matrix.ensure-version-mismatch }}
run: |
docker compose -f ./test/docker-compose.yml ps
CURRENT_DOCKER_COMPOSE_VERSION=$(docker compose version --short)
echo "Current docker compose version: $CURRENT_DOCKER_COMPOSE_VERSION"
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
test-action-with-down-flags:
runs-on: ubuntu-latest
name: Test compose action
steps:
- uses: actions/checkout@v4
if [ "$CURRENT_DOCKER_COMPOSE_VERSION" == "$DOCKER_COMPOSE_VERSION" ]; then
echo "Docker compose version is already in $DOCKER_COMPOSE_VERSION version"
exit 1
fi
- name: Act
uses: ./
with:
compose-file: "./test/docker-compose.yml"
down-flags: "--volumes"
test-action-with-compose-flags:
runs-on: ubuntu-latest
name: Test with compose flags
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "./test/docker-compose.yml"
compose-flags: "--profile profile-1"
down-flags: "--volumes"
- name: "Assert: profile is used"
run: |
docker compose -f ./test/docker-compose.yml -p profile-1 ps || (echo "Profile not used" && exit 1)
test-action-with-env:
runs-on: ubuntu-latest
name: Test with env
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "./test/docker-compose-with-env.yml"
compose-file: ${{ matrix.use-absolute-path && steps.compose-path.outputs.absolute || matrix.compose-file }}
services: ${{ matrix.services || '' }}
down-flags: ${{ matrix.down-flags || '' }}
compose-flags: ${{ matrix.compose-flags || '' }}
compose-version: ${{ matrix.compose-version || '' }}
cwd: ${{ matrix.cwd || '' }}
up-flags: ${{ matrix.up-flags || '' }}
docker-flags: ${{ matrix.docker-flags || '' }}
env:
IMAGE_NAME: busybox
IMAGE_NAME: ${{ matrix.image-name || '' }}
- name: "Assert: env is used"
- name: ${{ matrix.assertion-name }}
if: ${{ matrix.assertion }}
run: ${{ matrix.assertion }}
env:
IMAGE_NAME: busybox
run: |
docker compose -f ./test/docker-compose-with-env.yml ps
docker compose -f ./test/docker-compose-with-env.yml ps | grep test-service-a-1 || (echo "Service service-a is not running" && exit 1)
test-action-with-multiple-compose-files:
runs-on: ubuntu-latest
name: Test with multiple compose files
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: |
./test/docker-compose.yml
./test/docker-compose.ci.yml
services: |
service-b
service-d
- name: "Assert: only expected services are running"
run: |
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-d-1 || (echo "Service service-d is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
(docker compose -f ./test/docker-compose.yml -f ./test/docker-compose.ci.yml ps | grep test-service-c-1 && echo "Unexpected service service-c is running" && exit 1) || true
test-action-with-cwd:
runs-on: ubuntu-latest
name: Test with cwd
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "docker-compose.yml"
cwd: "./test"
services: |
service-b
service-c
- name: "Assert: only expected services are running"
run: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
test-action-with-absolute-path:
runs-on: ubuntu-latest
name: Test with absolute path
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "${{ github.workspace }}/test/docker-compose.yml"
services: |
service-b
service-c
- name: "Assert: only expected services are running"
run: |
docker compose -f ./test/docker-compose.yml ps
docker compose -f ./test/docker-compose.yml ps | grep test-service-b-1 || (echo "Service service-b is not running" && exit 1)
docker compose -f ./test/docker-compose.yml ps | grep test-service-c-1 || (echo "Service service-c is not running" && exit 1)
(docker compose -f ./test/docker-compose.yml ps | grep test-service-a-1 && echo "Unexpected service service-a is running" && exit 1) || true
test-abort-on-container-exit:
runs-on: ubuntu-latest
name: Test with --abort-on-container-exit
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "test/docker-compose-web-mysql.yml"
up-flags: "--build --abort-on-container-exit --exit-code-from=web"
test-attach-dependencies-failure:
runs-on: ubuntu-latest
name: Test with --attach-dependencies and service failure
steps:
- uses: actions/checkout@v4
- name: Act
uses: ./
with:
compose-file: "test/docker-compose-fail.yml"
up-flags: "--attach-dependencies"
- name: Assert
run: |
EXIT_CODE=$(docker compose -f ./test/docker-compose-fail.yml ps service-a --all --format json | jq ".ExitCode")
[ "$EXIT_CODE" == "1" ] || (echo "Service service-a did not exit with code 1" && exit 1)
IMAGE_NAME: ${{ matrix.image-name || '' }}

View File

@ -3,20 +3,25 @@ name: Internal - Checks for dist
on:
workflow_call:
permissions:
contents: read
permissions: {}
jobs:
check-dist:
name: Check dist
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@0.6.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- id: setup-node
uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@c9d9d041ba4ef35695ee469c4782fa6a8bbebbcc # 0.21.2
- name: Build dist/ Directory
id: package
run: npm run package
run: ${{ steps.setup-node.outputs.run-script-command }} package
# This will fail the workflow if the PR wasn't created by Dependabot.
- name: Compare Directories
@ -27,13 +32,3 @@ jobs:
git diff --ignore-space-at-eol --text dist/
exit 1
fi
# If `dist/` was different than expected, and this was not a Dependabot
# PR, upload the expected version as a workflow artifact.
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
name: Upload Artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

View File

@ -3,17 +3,18 @@ name: Internal - Checks for nodejs
on:
workflow_call:
permissions:
contents: read
security-events: write
id-token: write
permissions: {}
jobs:
test-nodejs:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@0.6.0
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@c9d9d041ba4ef35695ee469c4782fa6a8bbebbcc # 0.21.2
permissions:
id-token: write
security-events: write
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
with:
build: ""
test: |
{"coverage":"codecov"}

View File

@ -3,16 +3,16 @@ name: Common Continuous Integration tasks
on:
workflow_call:
permissions:
contents: read
packages: read
statuses: write
security-events: write
id-token: write
permissions: {}
jobs:
linter:
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0.15.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
permissions:
actions: read
contents: read
security-events: write
statuses: write
with:
linter-env: |
FILTER_REGEX_EXCLUDE=dist/**/*
@ -27,14 +27,24 @@ jobs:
name: Test nodejs
needs: linter
uses: ./.github/workflows/__check-nodejs.yml
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
secrets: inherit
check-dist:
name: Test nodejs
needs: linter
uses: ./.github/workflows/__check-dist.yml
permissions:
contents: read
check-action:
name: Test action
needs: [check-nodejs, check-dist]
uses: ./.github/workflows/__check-action.yml
permissions:
contents: read

View File

@ -6,11 +6,12 @@ on:
pull_request_target:
branches: [main]
permissions:
contents: read
issues: write
pull-requests: write
permissions: {}
jobs:
greetings:
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@0.15.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
permissions:
contents: read
issues: write
pull-requests: write

View File

@ -5,39 +5,64 @@ on:
branches: [main]
tags: ["*"]
permissions:
contents: read
packages: read
statuses: write
security-events: write
id-token: write
workflow_dispatch:
schedule:
- cron: "25 8 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
ci:
uses: ./.github/workflows/__shared-ci.yml
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
statuses: write
secrets: inherit
generate-readme:
prepare-docs:
needs: ci
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
- uses: bitflight-devops/github-action-readme-generator@v1.8.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
owner: hoverkraft-tech
repo: compose-action
persist-credentials: false
- uses: actions/create-github-app-token@v1
- name: 📖 Generate documentation
id: generate-documentation
uses: hoverkraft-tech/ci-dokumentor@c46a1a108957237cf485103a80b060c35c7dba33 # 0.2.2
with:
source: action.yml
extra-badges: |
[
{
"label":"codecov",
"url":"https://codecov.io/gh/hoverkraft-tech/compose-action/graph/badge.svg?token=90JXB7EIMA",
"linkUrl":"https://codecov.io/gh/hoverkraft-tech/compose-action"
}
]
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: generate-token
with:
app-id: ${{ vars.CI_BOT_APP_ID }}
private-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@0.15.0
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
with:
github-token: ${{ steps.generate-token.outputs.token }}
branch: docs/actions-workflows-documentation-update
@ -47,3 +72,23 @@ jobs:
docs: update actions and workflows documentation
[skip ci]
- id: upload-artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: documentation-files-${{ github.run_id }}
path: |
${{ steps.generate-documentation.outputs.destination }}
.github/logo.svg
sync-docs:
needs: prepare-docs
if: needs.prepare-docs.outputs.artifact-id
uses: hoverkraft-tech/public-docs/.github/workflows/sync-docs-dispatcher.yml@c40c17f7d6a8090950b3ef4bfc70502707a6bb9f # 0.3.0
permissions:
contents: read
with:
artifact-id: ${{ needs.prepare-docs.outputs.artifact-id }}
github-app-id: ${{ vars.CI_BOT_APP_ID }}
secrets:
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}

View File

@ -15,13 +15,14 @@ on:
before it; to go back further, enter an earlier SHA here"
required: false
permissions:
contents: read
issues: write
permissions: {}
jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@0.15.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
permissions:
contents: read
issues: write
with:
manual-commit-ref: ${{ inputs.manual-commit-ref }}
manual-base-ref: ${{ inputs.manual-base-ref }}

26
.github/workflows/prepare-release.yml vendored Normal file
View File

@ -0,0 +1,26 @@
---
name: "Prepare release"
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
release:
uses: hoverkraft-tech/ci-github-publish/.github/workflows/prepare-release.yml@84e8ace407055e7a40ba6670a8c697e1ce2dfafa # 0.20.1
permissions:
contents: write
id-token: write
pull-requests: write
with:
github-app-id: ${{ vars.CI_BOT_APP_ID }}
secrets:
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}

View File

@ -5,12 +5,7 @@ on:
pull_request:
branches: [main]
permissions:
contents: read
packages: read
statuses: write
security-events: write
id-token: write
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -19,4 +14,12 @@ concurrency:
jobs:
ci:
uses: ./.github/workflows/__shared-ci.yml
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
statuses: write
secrets: inherit

View File

@ -0,0 +1,30 @@
name: Release new action version
on:
release:
types: [released]
workflow_dispatch:
inputs:
#checkov:skip=CKV_GHA_7: required
TAG_NAME:
description: "Tag name that the major tag will point to"
required: true
env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
permissions: {}
jobs:
update_tag:
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: releaseNewActionVersion
steps:
- name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@23f4c6f12633a2da8f44938b71fde9afec138fb4 # v0.4.0
with:
source-tag: ${{ env.TAG_NAME }}

View File

@ -7,10 +7,11 @@ on:
- edited
- synchronize
permissions:
contents: write
pull-requests: write
permissions: {}
jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@0.15.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
permissions:
contents: write
pull-requests: write

View File

@ -4,10 +4,11 @@ on:
schedule:
- cron: "30 1 * * *"
permissions:
issues: write
pull-requests: write
permissions: {}
jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@0.15.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
permissions:
issues: write
pull-requests: write

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
eslint-report.json
# Runtime data
pids

View File

@ -1 +1 @@
20.6.0
20.19.3

80
AGENTS.md Normal file
View File

@ -0,0 +1,80 @@
# AGENTS.md — agent instructions and operational contract
This file exists so automated contributors (Copilot agents, bots, scripts) follow the same guardrails as human maintainers when working in `hoverkraft-tech/compose-action`. It summarizes what to read, which commands to run, and what is out of scope for agents.
## Organization-wide guidelines
- Always read and obey [hoverkraft-tech/.github/AGENTS.md](https://github.com/hoverkraft-tech/.github/blob/main/AGENTS.md) before touching this repository.
- Apply any additional instructions surfaced by the workspace (global Visual Studio Code prompts, repo-specific notices) alongside this contract.
## Canonical docs
- [README.md](./README.md) — product overview, supported inputs, and workflow examples. This is the primary contract for action users.
- [CONTRIBUTING.md](./CONTRIBUTING.md) — PR expectations, release hygiene, and how to collaborate with maintainers.
- [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) — behavioral expectations for every interaction.
## Instructional docs
- Source of truth for runtime logic lives under [`src/`](./src). Tests mirror the same structure under [`src/**/*.test.ts`](./src).
- GitHub Action fixtures and sample compose files live under [`test/`](./test). Use them when reproducing CI flows locally.
- Build artifacts belong in `dist/`. Never edit generated files by hand; instead update the matching TypeScript source and rerun the packaging commands described below.
## High-level rules (mandatory)
- Favor small, reviewable diffs. Coordinate large refactors with maintainers before starting.
- Keep behavior changes documented: update `README.md` and any affected workflow snippets.
- Never hardcode secrets, tokens, or personal data. Use GitHub Actions secrets or ask maintainers to provision them.
- Node 20+ is required. Match the tooling versions declared in `package.json`.
## Agent operational contract (when modifying code)
Before opening a PR or pushing a branch:
1. Read the relevant sections of `README.md` and inspect any affected files in `src/` and `test/`.
2. Implement changes in TypeScript source only; regenerate bundles with `npm run package` when shipping executable artifacts.
3. Run local validation limited to impacted areas at minimum:
- `npm run lint` (or `npm run lint:ci` when you need JSON output for CI).
- `npm run build` (type-check only).
- `npm run test` for quick feedback; `npm run test:ci` to reproduce CI (coverage + serial runs).
4. For action behavior changes, exercise the representative workflow under `test/` (e.g., `test/docker-compose.yml`) to confirm compose invocations behave as expected.
5. Add or update unit tests alongside any new logic, covering at least the happy path plus one failure or edge scenario.
6. Keep commits self-contained and use conventional commit messages compatible with `@commitlint/config-conventional`.
When opening a PR:
- Target a feature branch off `main`.
- Describe intent, touched areas, and the manual + automated test plan.
- Reference the docs you followed (for example: "Validated against readme > Usage" or "Followed CONTRIBUTING.md".).
- Ensure CI (lint, build, tests, package) is green before requesting human review.
## Validation & quality gates
- **Build:** `npm run build` must succeed (TypeScript compile cleanly, no `tsc` errors).
- **Lint:** `npm run lint:ci` must pass with no new warnings. Attach `eslint-report.json` to CI artifacts when relevant.
- **Tests:** `npm run test:ci` must pass and update coverage artifacts (see `coverage/`).
- **Bundle:** `npm run package` must regenerate `dist/` outputs; include updated bundles in the PR if runtime code changed.
## Allowed agent actions (examples)
- Fix documentation, typos, or metadata referenced by the GitHub Marketplace listing.
- Add or update unit tests, mocks, and fixtures in `src/` or `test/`.
- Refactor TypeScript modules in small, behavior-preserving increments (with tests and package outputs refreshed).
- Adjust CI/workflow helpers under `test/` to improve local reproducibility.
## Disallowed actions (must not do)
- Do not commit generated `dist/` artifacts without updating the corresponding TypeScript source and documenting the command used.
- Do not introduce new runtime dependencies without maintainer approval; prefer built-in Node APIs or existing deps.
- Do not modify Dockerfiles or GitHub Actions workflows to add secrets, credentials, or privileged steps.
- Do not land breaking changes to the public action inputs/outputs without updating `README.md` and gaining explicit maintainer sign-off.
## Guidance summary (quick checklist)
1. Read `README.md` + relevant source/test files.
2. Make the minimal change; add tests.
3. Run `npm run lint`, `npm run build`, `npm run test:ci`, and `npm run package`.
4. Open a PR referencing the docs you followed and include the test plan.
## If uncertain
Open an issue or draft PR in this repository describing the scenario, what docs you read, and the question you still have. Ping maintainers instead of guessing. When in doubt about the workflow contract, defer to the `README.md` and organization-wide AGENTS file.

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM ghcr.io/super-linter/super-linter:slim-v8.0.0
HEALTHCHECK --interval=5m --timeout=10s --start-period=30s --retries=3 CMD ["/bin/sh","-c","test -d /github/home"]
ARG UID=1000
ARG GID=1000
RUN chown -R ${UID}:${GID} /github/home
USER ${UID}:${GID}
ENV RUN_LOCAL=true
ENV USE_FIND_ALGORITHM=true
ENV LOG_LEVEL=WARN
ENV LOG_FILE="/github/home/logs"

View File

@ -1,6 +1,6 @@
MIT License
Copyright Hoverkraft
Copyright hoverkraft
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in

48
Makefile Normal file
View File

@ -0,0 +1,48 @@
.PHONY: help
help: ## Display help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
lint: ## Execute linting
$(call run_linter,)
lint-fix: ## Execute linting and fix
$(call run_linter, \
-e FIX_JSON_PRETTIER=true \
-e FIX_JAVASCRIPT_PRETTIER=true \
-e FIX_YAML_PRETTIER=true \
-e FIX_MARKDOWN=true \
-e FIX_MARKDOWN_PRETTIER=true \
-e FIX_NATURAL_LANGUAGE=true \
)
ci: ## Execute all formats and checks
@npm install
@npm audit fix
@npm run all
$(MAKE) lint-fix
define run_linter
DEFAULT_WORKSPACE="$(CURDIR)"; \
LINTER_IMAGE="linter:latest"; \
VOLUME="$$DEFAULT_WORKSPACE:$$DEFAULT_WORKSPACE"; \
docker build --build-arg UID=$(shell id -u) --build-arg GID=$(shell id -g) --tag $$LINTER_IMAGE .; \
docker run \
-e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \
-e FILTER_REGEX_INCLUDE="$(filter-out $@,$(MAKECMDGOALS))" \
-e IGNORE_GITIGNORED_FILES=true \
-e FILTER_REGEX_EXCLUDE=dist/**/* \
-e VALIDATE_TYPESCRIPT_ES=false \
-e VALIDATE_TYPESCRIPT_PRETTIER=false \
-e VALIDATE_JAVASCRIPT_ES=false \
$(1) \
-v $$VOLUME \
--rm \
$$LINTER_IMAGE
endef
#############################
# Argument fix workaround
#############################
%:
@:

252
README.md
View File

@ -1,100 +1,126 @@
<!-- markdownlint-disable-next-line first-line-heading -->
<div align="center" width="100%">
<!-- start branding -->
<!-- header:start -->
<img src=".github/ghadocs/branding.svg" width="15%" align="center" alt="branding<icon:anchor color:gray-dark>" />
<!-- end branding -->
<!-- start title -->
# <img src=".github/ghadocs/branding.svg" width="60px" align="center" alt="branding<icon:anchor color:gray-dark>" /> GitHub Action: Docker Compose Action
<!-- end title -->
<!-- start badges -->
<a href="https%3A%2F%2Fgithub.com%2Fhoverkraft-tech%2Fcompose-action%2Freleases%2Flatest"><img src="https://img.shields.io/github/v/release/hoverkraft-tech/compose-action?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release%20by%20tag" /></a><a href="https%3A%2F%2Fgithub.com%2Fhoverkraft-tech%2Fcompose-action%2Freleases%2Flatest"><img src="https://img.shields.io/github/release-date/hoverkraft-tech/compose-action?display_name=tag&sort=semver&logo=github&style=flat-square" alt="Release%20by%20date" /></a><img src="https://img.shields.io/github/last-commit/hoverkraft-tech/compose-action?logo=github&style=flat-square" alt="Commit" /><a href="https%3A%2F%2Fgithub.com%2Fhoverkraft-tech%2Fcompose-action%2Fissues"><img src="https://img.shields.io/github/issues/hoverkraft-tech/compose-action?logo=github&style=flat-square" alt="Open%20Issues" /></a><img src="https://img.shields.io/github/downloads/hoverkraft-tech/compose-action/total?logo=github&style=flat-square" alt="Downloads" />
<!-- end badges -->
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYW5jaG9yIiBjb2xvcj0iYmx1ZSI+PGNpcmNsZSBjeD0iMTIiIGN5PSI1IiByPSIzIj48L2NpcmNsZT48bGluZSB4MT0iMTIiIHkxPSIyMiIgeDI9IjEyIiB5Mj0iOCI+PC9saW5lPjxwYXRoIGQ9Ik01IDEySDJhMTAgMTAgMCAwIDAgMjAgMGgtMyI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Docker Compose Action
<div align="center">
<img src=".github/logo.svg" width="60px" align="center" alt="Docker Compose Action" />
</div>
<!-- start description -->
This action runs your docker-compose file and clean up before action finished
---
<!-- end description -->
<!-- header:end -->
<!-- start contents -->
<!-- end contents -->
<!-- badges:start -->
## Usage
[![Marketplace](https://img.shields.io/badge/Marketplace-docker--compose--action-blue?logo=github-actions)](https://github.com/marketplace/actions/docker-compose-action)
[![Release](https://img.shields.io/github/v/release/hoverkraft-tech/compose-action)](https://github.com/hoverkraft-tech/compose-action/releases)
[![License](https://img.shields.io/github/license/hoverkraft-tech/compose-action)](http://choosealicense.com/licenses/mit/)
[![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)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/compose-action/blob/main/CONTRIBUTING.md)
[![codecov](https://codecov.io/gh/hoverkraft-tech/compose-action/graph/badge.svg?token=90JXB7EIMA)](https://codecov.io/gh/hoverkraft-tech/compose-action)
<!-- badges:end -->
<!-- overview:start -->
## Overview
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 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.
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.
In debug mode, the logs of the running services are printed before the cleanup.
On post hook, the action will run `docker compose down` to clean up the services.
Some extra options can be passed to the `docker-compose down` command using the `down-flags` input.
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.
<!-- start usage -->
Some extra options can be passed to the `docker compose down` command using the `down-flags` input.
<!-- overview:end -->
<!-- usage:start -->
## Usage
```yaml
- uses: hoverkraft-tech/compose-action@v0.0.0
- uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
# 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).
#
# Default: ./docker-compose.yml
compose-file: ""
# Additional options to pass to `docker` command.
docker-flags: ""
# Description: Services to perform docker-compose up.
#
# Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd).
# Default: `./docker-compose.yml`
compose-file: ./docker-compose.yml
# Services to perform `docker compose up`.
services: ""
# Description: Additional options to pass to `docker-compose up` command.
#
# Default:
# Additional options to pass to `docker compose up` command.
up-flags: ""
# Description: Additional options to pass to `docker-compose down` command.
#
# Default:
# Additional options to pass to `docker compose down` command.
down-flags: ""
# Description: Additional options to pass to `docker-compose` command.
#
# Default:
# Additional options to pass to `docker compose` command.
compose-flags: ""
# Description: Current working directory
# Current working directory
# Default: `${{ github.workspace }}`
cwd: ${{ github.workspace }}
# Compose version to use.
# If null (default), it will use the current installed version.
# If "latest", it will install the latest version.
compose-version: ""
# The log level used for Docker Compose service logs.
# Can be one of "debug", "info".
#
# Default: ${{ github.workspace }}
cwd: ""
# Default: `debug`
services-log-level: debug
# The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose).
# Default: `${{ github.token }}`
github-token: ${{ github.token }}
```
<!-- end usage -->
<!-- usage:end -->
<!-- inputs:start -->
## Inputs
<!-- start inputs -->
| **Input** | **Description** | **Required** | **Default** |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------- |
| **`docker-flags`** | Additional options to pass to `docker` command. | **false** | - |
| **`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` |
| **`services`** | Services to perform `docker compose up`. | **false** | - |
| **`up-flags`** | Additional options to pass to `docker compose up` command. | **false** | - |
| **`down-flags`** | Additional options to pass to `docker compose down` command. | **false** | - |
| **`compose-flags`** | Additional options to pass to `docker compose` command. | **false** | - |
| **`cwd`** | Current working directory | **false** | `${{ github.workspace }}` |
| **`compose-version`** | Compose version to use. | **false** | - |
| | If null (default), it will use the current installed version. | | |
| | If "latest", it will install the latest version. | | |
| **`services-log-level`** | The log level used for Docker Compose service logs. | **false** | `debug` |
| | Can be one of "debug", "info". | | |
| **`github-token`** | The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose). | **false** | `${{ github.token }}` |
| **Input** | **Description** | **Default** | **Required** |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------ |
| <code>compose-file</code> | Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd). | <code>./docker-compose.yml</code> | **false** |
| <code>services</code> | Services to perform docker-compose up. | | **false** |
| <code>up-flags</code> | Additional options to pass to <code>docker-compose up</code> command. | | **false** |
| <code>down-flags</code> | Additional options to pass to <code>docker-compose down</code> command. | | **false** |
| <code>compose-flags</code> | Additional options to pass to <code>docker-compose</code> command. | | **false** |
| <code>cwd</code> | Current working directory | <code>${{ github.workspace }}</code> | **false** |
<!-- inputs:end -->
<!-- end inputs -->
<!-- start outputs -->
<!-- end outputs -->
<!-- secrets:start -->
<!-- secrets:end -->
<!-- outputs:start -->
<!-- outputs:end -->
<!-- examples:start -->
## Examples
@ -110,27 +136,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: Run docker-compose
uses: hoverkraft-tech/compose-action@v2.0.1
- name: Run docker compose
uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
compose-file: "./docker/docker-compose.yml"
- name: Execute tests in the running services
run: |
docker-compose exec test-app pytest
docker compose exec test-app pytest
```
<!-- start [.github/ghadocs/examples/] -->
<!-- end [.github/ghadocs/examples/] -->
### Example Using environment variables
```yaml
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/compose-action@v2.0.1
- uses: actions/checkout@v4.2.2
- uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
compose-file: "./docker/docker-compose.yml"
env:
@ -139,13 +162,13 @@ steps:
### Example using `services`
Perform `docker-compose up` to some given service instead of all of them
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@v2.0.1
- uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
compose-file: "./docker/docker-compose.yml"
services: |
@ -155,33 +178,86 @@ steps:
### 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/).
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/).
### 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/).
Specify flags to pass to the `docker compose down` command during cleanup.
Default is none.
Can be used to pass the 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/).
### 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).
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@v2.0.1
- uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
compose-file: "./docker/docker-compose.yml"
services: |
helloworld2
helloworld3
compose-flags: "--profile profile-1"
```
Specify multiple compose files to use with the `docker compose` command.
This is useful when you have a base compose file and additional files for different environments or configurations.
```yaml
steps:
# need checkout before using compose-action
- uses: actions/checkout@v3
- uses: hoverkraft-tech/compose-action@248470ecc5ed40d8ed3d4480d8260d77179ef579 # v2.4.2
with:
compose-file: |
./docker/docker-compose.yml
./docker/docker-compose.ci.yml
```
<!-- examples:end -->
<!-- contributing:start -->
## Contributing
Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/compose-action/blob/main/CONTRIBUTING.md) for more details.
<!-- contributing:end -->
<!-- security:start -->
<!-- security:end -->
<!-- license:start -->
## License
This project is licensed under the MIT License.
SPDX-License-Identifier: MIT
Copyright © 2026 hoverkraft
For more details, see the [license](http://choosealicense.com/licenses/mit/).
<!-- license:end -->
<!-- generated:start -->
---
This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).
<!-- generated:end -->

View File

@ -1,34 +1,69 @@
# ### 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.
name: "Docker Compose Action"
description: "This action runs your docker-compose file and clean up before action finished"
author: "Hoverkraft"
description: This action runs your compose file(s) and clean up before action finished
author: "hoverkraft"
branding:
icon: anchor
color: gray-dark
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."
description: "Services to perform `docker compose up`."
required: false
up-flags:
description: "Additional options to pass to `docker-compose up` command."
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."
description: "Additional options to pass to `docker compose down` command."
required: false
default: ""
compose-flags:
description: "Additional options to pass to `docker-compose` command."
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

16307
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

513
dist/licenses.txt generated vendored
View File

@ -10,6 +10,30 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/exec
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/github
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client
MIT
Actions Http Client for Node.js
@ -35,6 +59,30 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/io
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/tool-cache
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
@ -57,6 +105,402 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/core
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/endpoint
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/graphql
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/plugin-paginate-rest
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/plugin-rest-endpoint-methods
MIT
MIT License Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@octokit/request
MIT
The MIT License
Copyright (c) 2018 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@octokit/request-error
MIT
The MIT License
Copyright (c) 2019 Octokit contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
before-after-hook
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Gregor Martynus and other contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
deprecation
ISC
The ISC License
Copyright (c) Gregor Martynus and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
docker-compose
MIT
MIT License
@ -82,6 +526,44 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
once
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
semver
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
tunnel
MIT
The MIT License (MIT)
@ -132,17 +614,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
uuid
MIT
The MIT License (MIT)
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
wrappy
ISC
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
yaml

6276
dist/post.js generated vendored

File diff suppressed because one or more lines are too long

3
eslint.config.mjs Normal file
View File

@ -0,0 +1,3 @@
import { default as tsDevToolsCore } from "@ts-dev-tools/core/dist/eslint-plugin-ts-dev-tools/index.js";
export default tsDevToolsCore.default;

9173
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,10 @@
"name": "compose-action",
"description": "Docker Compose Action",
"version": "0.0.0",
"author": "",
"private": true,
"author": "hoverkraft",
"license": "MIT",
"homepage": "https://github.com/hoverkraft-tech/compose-action",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/hoverkraft-tech/compose-action.git"
@ -22,23 +23,36 @@
"engines": {
"node": ">=20"
},
"dependencies": {
"@actions/core": "^2.0.1",
"@actions/github": "^6.0.1",
"@actions/tool-cache": "^2.0.2",
"@octokit/action": "^8.0.4",
"docker-compose": "^1.3.0"
},
"devDependencies": {
"@ts-dev-tools/core": "^1.9.14",
"@vercel/ncc": "^0.38.4",
"eslint-plugin-github": "^6.0.0",
"eslint-plugin-jsonc": "^2.21.0"
},
"scripts": {
"package": "npm run package:index && npm run package:post",
"package:index": "ncc build src/index.ts -o dist --license licenses.txt",
"package:post": "ncc build src/post.ts -o dist/post && mv dist/post/index.js dist/post.js && rm -rf dist/post",
"package:watch": "npm run package -- --watch",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"all": "npm run format && npm run lint && npm run test && npm run package",
"lint:ci": "npm run lint -- --output-file eslint-report.json --format json",
"all": "npm run format && npm run lint:ci && npm run test:ci && npm run package",
"build": "tsc --noEmit",
"format": "prettier --cache --write '**/*.ts'",
"format": "prettier --cache --write .",
"jest": "jest --detectOpenHandles --forceExit",
"test": "npm run jest --maxWorkers=50%",
"test:watch": "npm run jest --watch --maxWorkers=25%",
"test:cov": "npm run test --coverage",
"test:ci": "npm run test:cov --runInBand",
"test": "npm run jest -- --maxWorkers=50%",
"test:watch": "npm run jest --watch -- --maxWorkers=25%",
"test:cov": "npm run test -- --coverage",
"test:ci": "npm run jest -- --coverage --runInBand",
"prepare": "ts-dev-tools install"
},
"license": "MIT",
"jest": {
"preset": "ts-jest",
"verbose": true,
@ -71,54 +85,11 @@
"**/src/**/*.[jt]s?(x)"
]
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@ts-dev-tools/core": "^1.6.2",
"docker-compose": "^0.24.7"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1",
"eslint-plugin-github": "^5.0.1",
"eslint-plugin-jsonc": "^2.14.1"
},
"eslintConfig": {
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"jest"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"prettier"
],
"env": {
"es2021": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"settings": {
"jest": {
"version": "detect"
}
},
"ignorePatterns": [
"dist",
"node_modules"
]
},
"prettier": {
"semi": true,
"printWidth": 100,
"trailingComma": "es5"
"trailingComma": "es5",
"plugins": []
},
"commitlint": {
"extends": [
@ -137,6 +108,6 @@
}
},
"tsDevTools": {
"version": "20220617100200-prettier-cache"
"version": "20250623095600-remove-prettier-oxc"
}
}

156
src/index-runner.test.ts Normal file
View File

@ -0,0 +1,156 @@
import * as core from "@actions/core";
import { InputService } from "./services/input.service";
import { LoggerService, LogLevel } from "./services/logger.service";
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
import * as indexRunner from "./index-runner";
import { DockerComposeService } from "./services/docker-compose.service";
describe("run", () => {
// Mock the external libraries and services used by the action
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
let installMock: jest.SpiedFunction<typeof DockerComposeInstallerService.prototype.install>;
let upMock: jest.SpiedFunction<typeof DockerComposeService.prototype.up>;
beforeEach(() => {
jest.clearAllMocks();
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
upMock = jest.spyOn(DockerComposeService.prototype, "up");
});
it("should install docker compose with specified version", async () => {
// Arrange
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: "1.29.2",
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
installMock.mockResolvedValue("1.29.2");
upMock.mockResolvedValue();
// Act
await indexRunner.run();
// Assert
expect(infoMock).toHaveBeenCalledWith("Setting up docker compose version 1.29.2");
expect(debugMock).toHaveBeenCalledWith(
'inputs: {"dockerFlags":[],"composeFiles":["docker-compose.yml"],"services":[],"composeFlags":[],"upFlags":[],"downFlags":[],"cwd":"/current/working/dir","composeVersion":"1.29.2","githubToken":null,"serviceLogLevel":"debug"}'
);
expect(installMock).toHaveBeenCalledWith({
composeVersion: "1.29.2",
cwd: "/current/working/dir",
githubToken: null,
});
expect(upMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
upFlags: [],
services: [],
serviceLogger: debugMock,
});
expect(setFailedMock).not.toHaveBeenCalled();
});
it("should bring up docker compose services", async () => {
// Arrange
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
// Act
await indexRunner.run();
// Assert
expect(upMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
upFlags: [],
services: ["web"],
serviceLogger: debugMock,
});
expect(setFailedMock).not.toHaveBeenCalled();
});
it("should handle errors and call setFailed", async () => {
// Arrange
const error = new Error("Test error");
upMock.mockRejectedValue(error);
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
// Act
await indexRunner.run();
// Assert
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
});
it("should handle unknown errors and call setFailed", async () => {
// Arrange
const error = "Test error";
upMock.mockRejectedValue(error);
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
// Act
await indexRunner.run();
// Assert
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
});
});

51
src/index-runner.ts Normal file
View File

@ -0,0 +1,51 @@
import { setFailed } from "@actions/core";
import { InputService } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { DockerComposeService } from "./services/docker-compose.service";
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
import { ManualInstallerAdapter } from "./services/installer-adapter/manual-installer-adapter";
/**
* The run function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function run(): Promise<void> {
try {
const loggerService = new LoggerService();
const inputService = new InputService();
const dockerComposeInstallerService = new DockerComposeInstallerService(
new ManualInstallerAdapter()
);
const dockerComposeService = new DockerComposeService();
const inputs = inputService.getInputs();
loggerService.debug(`inputs: ${JSON.stringify(inputs)}`);
loggerService.info(
"Setting up docker compose" +
(inputs.composeVersion ? ` version ${inputs.composeVersion}` : "")
);
const installedVersion = await dockerComposeInstallerService.install({
composeVersion: inputs.composeVersion,
cwd: inputs.cwd,
githubToken: inputs.githubToken,
});
loggerService.info(`docker compose version: ${installedVersion}`);
loggerService.info("Bringing up docker compose service(s)");
await dockerComposeService.up({
dockerFlags: inputs.dockerFlags,
composeFiles: inputs.composeFiles,
composeFlags: inputs.composeFlags,
cwd: inputs.cwd,
upFlags: inputs.upFlags,
services: inputs.services,
serviceLogger: loggerService.getServiceLogger(inputs.serviceLogLevel),
});
loggerService.info("docker compose service(s) are up");
} catch (error) {
setFailed(`${error instanceof Error ? error : JSON.stringify(error)}`);
}
}

View File

@ -1,13 +1,14 @@
import * as core from "@actions/core";
import { DockerComposeService } from "./services/docker-compose.service";
import { InputService } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { LoggerService, LogLevel } from "./services/logger.service";
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
let versionMock: jest.SpiedFunction<typeof DockerComposeService.prototype.version>;
let installMock: jest.SpiedFunction<typeof DockerComposeInstallerService.prototype.install>;
let upMock: jest.SpiedFunction<typeof DockerComposeService.prototype.up>;
describe("index", () => {
@ -18,45 +19,54 @@ describe("index", () => {
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
versionMock = jest.spyOn(DockerComposeService.prototype, "version");
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
upMock = jest.spyOn(DockerComposeService.prototype, "up");
});
it("calls run when imported", async () => {
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
versionMock.mockResolvedValueOnce("1.2.3");
installMock.mockResolvedValue("1.2.3");
upMock.mockResolvedValueOnce();
// eslint-disable-next-line @typescript-eslint/no-require-imports
await require("../src/index");
await new Promise((resolve) => setTimeout(resolve, 0));
expect(infoMock).toHaveBeenNthCalledWith(1, "docker-compose version: 1.2.3");
expect(infoMock).toHaveBeenNthCalledWith(1, "Setting up docker compose");
expect(infoMock).toHaveBeenNthCalledWith(2, "docker compose version: 1.2.3");
// Verify that all of the functions were called correctly
expect(debugMock).toHaveBeenNthCalledWith(
1,
'inputs: {"composeFiles":["docker-compose.yml"],"services":[],"composeFlags":[],"upFlags":[],"downFlags":[],"cwd":"/current/working/dir"}'
'inputs: {"dockerFlags":[],"composeFiles":["docker-compose.yml"],"services":[],"composeFlags":[],"upFlags":[],"downFlags":[],"cwd":"/current/working/dir","composeVersion":null,"githubToken":null,"serviceLogLevel":"debug"}'
);
expect(infoMock).toHaveBeenNthCalledWith(3, "Bringing up docker compose service(s)");
expect(upMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
serviceLogger: debugMock,
});
expect(setFailedMock).not.toHaveBeenCalled();
expect(infoMock).toHaveBeenNthCalledWith(2, "docker-compose is up");
expect(infoMock).toHaveBeenNthCalledWith(4, "docker compose service(s) are up");
});
});

View File

@ -1,22 +1,6 @@
/**
* The entrypoint for the action.
*/
import { RunCallback, run } from "./runner";
import { DockerComposeService } from "./services/docker-compose.service";
import { Inputs } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { run } from "./index-runner";
const callback: RunCallback = async (
inputs: Inputs,
loggerService: LoggerService,
dockerComposeService: DockerComposeService
) => {
const composeVersion = await dockerComposeService.version(inputs);
loggerService.info(`docker-compose version: ${composeVersion}`);
await dockerComposeService.up(inputs);
loggerService.info("docker-compose is up");
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run(callback);
run();

187
src/post-runner.test.ts Normal file
View File

@ -0,0 +1,187 @@
import * as core from "@actions/core";
import { InputService } from "./services/input.service";
import { LoggerService, LogLevel } from "./services/logger.service";
import * as postRunner from "./post-runner";
import { DockerComposeService } from "./services/docker-compose.service";
// Mock the external libraries and services used by the action
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
let downMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
let logsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
describe("run", () => {
beforeEach(() => {
jest.clearAllMocks();
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
downMock = jest.spyOn(DockerComposeService.prototype, "down");
logsMock = jest.spyOn(DockerComposeService.prototype, "logs");
});
it("should bring down docker compose service(s) and log output", async () => {
// Arrange
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
logsMock.mockResolvedValue({ error: "", output: "test logs" });
downMock.mockResolvedValue();
// Act
await postRunner.run();
// Assert
expect(logsMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
services: [],
serviceLogger: debugMock,
});
expect(downMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
downFlags: [],
serviceLogger: debugMock,
});
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs");
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
expect(setFailedMock).not.toHaveBeenCalled();
});
it("should log docker composer errors if any", async () => {
// Arrange
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
logsMock.mockResolvedValue({
error: "test logs error",
output: "test logs output",
});
downMock.mockResolvedValue();
// Act
await postRunner.run();
// Assert
expect(logsMock).toHaveBeenCalledWith({
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
dockerFlags: [],
services: [],
serviceLogger: debugMock,
});
expect(downMock).toHaveBeenCalledWith({
composeFiles: ["docker-compose.yml"],
composeFlags: [],
cwd: "/current/working/dir",
dockerFlags: [],
downFlags: [],
serviceLogger: debugMock,
});
expect(debugMock).toHaveBeenCalledWith("docker compose error:\ntest logs error");
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs output");
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
});
it("should set failed when an error occurs", async () => {
// Arrange
getInputsMock.mockImplementation(() => {
throw new Error("An error occurred");
});
// Act
await postRunner.run();
// Assert
expect(setFailedMock).toHaveBeenCalledWith("Error: An error occurred");
});
it("should handle errors and call setFailed", async () => {
// Arrange
const error = new Error("Test error");
downMock.mockRejectedValue(error);
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
// Act
await postRunner.run();
// Assert
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
});
it("should handle unknown errors and call setFailed", async () => {
// Arrange
const error = "Test error";
downMock.mockRejectedValue(error);
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
// Act
await postRunner.run();
// Assert
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
});
});

46
src/post-runner.ts Normal file
View File

@ -0,0 +1,46 @@
import { setFailed } from "@actions/core";
import { InputService } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { DockerComposeService } from "./services/docker-compose.service";
/**
* The run function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function run(): Promise<void> {
try {
const loggerService = new LoggerService();
const inputService = new InputService();
const dockerComposeService = new DockerComposeService();
const inputs = inputService.getInputs();
const { error, output } = await dockerComposeService.logs({
dockerFlags: inputs.dockerFlags,
composeFiles: inputs.composeFiles,
composeFlags: inputs.composeFlags,
cwd: inputs.cwd,
services: inputs.services,
serviceLogger: loggerService.getServiceLogger(inputs.serviceLogLevel),
});
if (error) {
loggerService.debug("docker compose error:\n" + error);
}
loggerService.debug("docker compose logs:\n" + output);
await dockerComposeService.down({
dockerFlags: inputs.dockerFlags,
composeFiles: inputs.composeFiles,
composeFlags: inputs.composeFlags,
cwd: inputs.cwd,
downFlags: inputs.downFlags,
serviceLogger: loggerService.getServiceLogger(inputs.serviceLogLevel),
});
loggerService.info("docker compose is down");
} catch (error) {
setFailed(`${error instanceof Error ? error : JSON.stringify(error)}`);
}
}

View File

@ -1,14 +1,14 @@
import * as core from "@actions/core";
import { DockerComposeService } from "./services/docker-compose.service";
import { InputService } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { LoggerService, LogLevel } from "./services/logger.service";
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
let downMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
let logsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
let downMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
describe("post", () => {
beforeEach(() => {
@ -18,54 +18,52 @@ describe("post", () => {
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
downMock = jest.spyOn(DockerComposeService.prototype, "down");
logsMock = jest.spyOn(DockerComposeService.prototype, "logs");
downMock = jest.spyOn(DockerComposeService.prototype, "down");
});
it("calls run when imported", async () => {
getInputsMock.mockImplementation(() => ({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
composeVersion: null,
githubToken: null,
serviceLogLevel: LogLevel.Debug,
}));
logsMock.mockResolvedValueOnce({ error: "", output: "log" });
logsMock.mockResolvedValue({ error: "", output: "test logs" });
downMock.mockResolvedValueOnce();
// eslint-disable-next-line @typescript-eslint/no-require-imports
await require("../src/post");
await new Promise((resolve) => setTimeout(resolve, 0));
// Verify that all of the functions were called correctly
expect(debugMock).toHaveBeenNthCalledWith(
1,
'inputs: {"composeFiles":["docker-compose.yml"],"services":[],"composeFlags":[],"upFlags":[],"downFlags":[],"cwd":"/current/working/dir"}'
);
expect(logsMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
services: [],
serviceLogger: debugMock,
});
expect(debugMock).toHaveBeenNthCalledWith(2, "docker-compose logs:\nlog");
expect(downMock).toHaveBeenCalledWith({
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
downFlags: [],
serviceLogger: debugMock,
});
expect(debugMock).toHaveBeenNthCalledWith(1, "docker compose logs:\ntest logs");
expect(infoMock).toHaveBeenNthCalledWith(1, "docker compose is down");
expect(setFailedMock).not.toHaveBeenCalled();
expect(infoMock).toHaveBeenCalledWith("docker-compose is down");
});
});

View File

@ -1,28 +1,6 @@
/**
* The entrypoint for the post action.
*/
import { RunCallback, run } from "./runner";
import { DockerComposeService } from "./services/docker-compose.service";
import { Inputs } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { run } from "./post-runner";
const callback: RunCallback = async (
inputs: Inputs,
loggerService: LoggerService,
dockerComposeService: DockerComposeService
) => {
const { error, output } = await dockerComposeService.logs(inputs);
if (error) {
loggerService.debug("docker-compose error:\n" + error);
}
loggerService.debug("docker-compose logs:\n" + output);
await dockerComposeService.down(inputs);
loggerService.info("docker-compose is down");
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run(callback);
run();

View File

@ -1,89 +0,0 @@
/**
* Unit tests for the action's main functionality, src/main.ts
*
* These should be run as if the action was called from a workflow.
* Specifically, the inputs listed in `action.yml` should be set as environment
* variables following the pattern `INPUT_<INPUT_NAME>`.
*/
import * as core from "@actions/core";
import { DockerComposeService } from "./services/docker-compose.service";
import { InputService } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import * as runner from "./runner";
// Mock the action's main function
const runMock = jest.spyOn(runner, "run");
// Mock the external libraries and services used by the action
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
describe("run", () => {
beforeEach(() => {
jest.clearAllMocks();
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
});
it("should call given callback when inputs are valid", async () => {
getInputsMock.mockImplementation(() => ({
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
}));
const callbackMock = jest.fn();
callbackMock.mockResolvedValueOnce(null);
await runner.run(callbackMock);
expect(runMock).toHaveReturned();
// Verify that all of the functions were called correctly
expect(debugMock).toHaveBeenNthCalledWith(
1,
'inputs: {"composeFiles":["docker-compose.yml"],"services":[],"composeFlags":[],"upFlags":[],"downFlags":[],"cwd":"/current/working/dir"}'
);
expect(callbackMock).toHaveBeenCalledWith(
{
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
},
expect.any(LoggerService),
expect.any(DockerComposeService)
);
expect(setFailedMock).not.toHaveBeenCalled();
});
it("sets a failed status", async () => {
getInputsMock.mockImplementation(() => ({
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
}));
const callbackMock = jest.fn();
callbackMock.mockRejectedValueOnce(new Error("unkown error"));
await runner.run(callbackMock);
expect(runMock).toHaveReturned();
// Verify that all of the functions were called correctly
expect(callbackMock).toHaveBeenCalled();
expect(setFailedMock).toHaveBeenNthCalledWith(1, "Error: unkown error");
});
});

View File

@ -1,29 +0,0 @@
import { setFailed } from "@actions/core";
import { InputService, Inputs } from "./services/input.service";
import { LoggerService } from "./services/logger.service";
import { DockerComposeService } from "./services/docker-compose.service";
export type RunCallback = (
inputs: Inputs,
loggerService: LoggerService,
dockerComposeService: DockerComposeService
) => Promise<void>;
/**
* The run function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function run(callback: RunCallback): Promise<void> {
try {
const loggerService = new LoggerService();
const inputService = new InputService();
const dockerComposeService = new DockerComposeService();
const inputs = inputService.getInputs();
loggerService.debug(`inputs: ${JSON.stringify(inputs)}`);
await callback(inputs, loggerService, dockerComposeService);
} catch (error) {
setFailed(`${error instanceof Error ? error : JSON.stringify(error)}`);
}
}

View File

@ -0,0 +1,210 @@
import * as dockerCompose from "docker-compose";
import { DockerComposeInstallerService } from "./docker-compose-installer.service";
import { ManualInstallerAdapter } from "./installer-adapter/manual-installer-adapter";
import { MockAgent, setGlobalDispatcher } from "undici";
jest.mock("docker-compose");
describe("DockerComposeInstallerService", () => {
let mockAgent: MockAgent;
let versionMock: jest.SpiedFunction<typeof dockerCompose.version>;
let manualInstallerAdapterMock: jest.Mocked<ManualInstallerAdapter>;
let service: DockerComposeInstallerService;
beforeEach(() => {
mockAgent = new MockAgent();
mockAgent.disableNetConnect();
versionMock = jest.spyOn(dockerCompose, "version").mockImplementation();
manualInstallerAdapterMock = {
install: jest.fn(),
} as unknown as jest.Mocked<ManualInstallerAdapter>;
service = new DockerComposeInstallerService(manualInstallerAdapterMock);
});
afterEach(() => {
jest.clearAllMocks();
});
describe("install", () => {
it("should not install anything when expected version is already installed", async () => {
// Arrange
versionMock.mockResolvedValue({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
},
});
// Act
const result = await service.install({
composeVersion: "1.2.3",
cwd: "/path/to/cwd",
githubToken: null,
});
// Assert
expect(result).toBe("1.2.3");
expect(manualInstallerAdapterMock.install).not.toHaveBeenCalled();
});
it("should install the requested version if it is not already installed", async () => {
// Arrange
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
},
});
const expectedVersion = "1.3.0";
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: expectedVersion,
},
});
Object.defineProperty(process, "platform", {
value: "linux",
});
// Act
const result = await service.install({
composeVersion: expectedVersion,
cwd: "/path/to/cwd",
githubToken: null,
});
// Assert
expect(result).toBe(expectedVersion);
expect(manualInstallerAdapterMock.install).toHaveBeenCalledWith(expectedVersion);
});
it("should install the latest version if requested", async () => {
// Arrange
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
},
});
const latestVersion = "v1.4.0";
const mockClient = mockAgent.get("https://api.github.com");
mockClient
.intercept({
path: "/repos/docker/compose/releases/latest",
method: "GET",
})
.reply(
200,
{
tag_name: latestVersion,
},
{
headers: {
"content-type": "application/json",
},
}
);
setGlobalDispatcher(mockClient);
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: latestVersion,
},
});
Object.defineProperty(process, "platform", {
value: "linux",
});
Object.defineProperty(globalThis, "fetch", {
value: jest.fn(),
});
// Act
const result = await service.install({
composeVersion: "latest",
cwd: "/path/to/cwd",
githubToken: "token",
});
// Assert
expect(result).toBe(latestVersion);
expect(manualInstallerAdapterMock.install).toHaveBeenCalledWith(latestVersion);
});
it("should throw an error if the latest version if requested and no Github token is provided", async () => {
// Arrange
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
},
});
// Act & Assert
await expect(
service.install({
composeVersion: "latest",
cwd: "/path/to/cwd",
githubToken: null,
})
).rejects.toThrow("GitHub token is required to install the latest version");
});
it("should throw an error on unsupported platforms", async () => {
// Arrange
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
},
});
const expectedVersion = "1.3.0";
versionMock.mockResolvedValueOnce({
exitCode: 0,
out: "",
err: "",
data: {
version: expectedVersion,
},
});
Object.defineProperty(process, "platform", {
value: "win32",
});
// Act & Assert
await expect(
service.install({
composeVersion: expectedVersion,
cwd: "/path/to/cwd",
githubToken: null,
})
).rejects.toThrow(`Unsupported platform: win32`);
expect(manualInstallerAdapterMock.install).not.toHaveBeenCalled();
});
});
});

View File

@ -0,0 +1,70 @@
import * as github from "@actions/github";
import { version } from "docker-compose";
import { COMPOSE_VERSION_LATEST, Inputs } from "./input.service";
import { ManualInstallerAdapter } from "./installer-adapter/manual-installer-adapter";
export type InstallInputs = {
composeVersion: Inputs["composeVersion"];
cwd: Inputs["cwd"];
githubToken: Inputs["githubToken"];
};
export type VersionInputs = {
cwd: Inputs["cwd"];
};
export class DockerComposeInstallerService {
constructor(private readonly manualInstallerAdapter: ManualInstallerAdapter) {}
async install({ composeVersion, cwd, githubToken }: InstallInputs): Promise<string> {
const currentVersion = await this.version({ cwd });
if (!composeVersion) {
return currentVersion;
}
if (currentVersion === composeVersion) {
return currentVersion;
}
if (composeVersion === COMPOSE_VERSION_LATEST) {
if (!githubToken) {
throw new Error("GitHub token is required to install the latest version");
}
composeVersion = await this.getLatestVersion(githubToken);
}
await this.installVersion(composeVersion);
return this.version({ cwd });
}
private async version({ cwd }: VersionInputs): Promise<string> {
const result = await version({
cwd,
});
return result.data.version;
}
private async getLatestVersion(githubToken: string): Promise<string> {
const octokit = github.getOctokit(githubToken);
const response = await octokit.rest.repos.getLatestRelease({
owner: "docker",
repo: "compose",
});
return response.data.tag_name;
}
private async installVersion(version: string): Promise<void> {
switch (process.platform) {
case "linux":
case "darwin":
await this.manualInstallerAdapter.install(version);
break;
default:
throw new Error(`Unsupported platform: ${process.platform}`);
}
}
}

View File

@ -1,24 +1,21 @@
import { v2 } from "docker-compose";
import { DockerComposeService } from "./docker-compose.service";
import { Inputs } from "./input.service";
import * as dockerCompose from "docker-compose";
import { DockerComposeService, DownInputs, LogsInputs, UpInputs } from "./docker-compose.service";
jest.mock("docker-compose");
describe("DockerComposeService", () => {
let service: DockerComposeService;
let upAllMock: jest.SpiedFunction<typeof v2.upAll>;
let upManyMock: jest.SpiedFunction<typeof v2.upMany>;
let downMock: jest.SpiedFunction<typeof v2.down>;
let logsMock: jest.SpiedFunction<typeof v2.logs>;
let versionMock: jest.SpiedFunction<typeof v2.version>;
let upAllMock: jest.SpiedFunction<typeof dockerCompose.upAll>;
let upManyMock: jest.SpiedFunction<typeof dockerCompose.upMany>;
let downMock: jest.SpiedFunction<typeof dockerCompose.down>;
let logsMock: jest.SpiedFunction<typeof dockerCompose.logs>;
beforeEach(() => {
service = new DockerComposeService();
upAllMock = jest.spyOn(v2, "upAll").mockImplementation();
upManyMock = jest.spyOn(v2, "upMany").mockImplementation();
downMock = jest.spyOn(v2, "down").mockImplementation();
logsMock = jest.spyOn(v2, "logs").mockImplementation();
versionMock = jest.spyOn(v2, "version").mockImplementation();
upAllMock = jest.spyOn(dockerCompose, "upAll").mockImplementation();
upManyMock = jest.spyOn(dockerCompose, "upMany").mockImplementation();
downMock = jest.spyOn(dockerCompose, "down").mockImplementation();
logsMock = jest.spyOn(dockerCompose, "logs").mockImplementation();
});
afterEach(() => {
@ -27,123 +24,297 @@ describe("DockerComposeService", () => {
describe("up", () => {
it("should call up with correct options", async () => {
const inputs: Inputs = {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
await service.up(inputs);
await service.up(upInputs);
expect(upAllMock).toHaveBeenCalledWith({
composeOptions: [],
commandOptions: [],
config: ["docker-compose.yml"],
log: true,
executable: {
executablePath: "docker",
options: [],
},
cwd: "/current/working/dir",
callback: expect.any(Function),
});
// Ensure callback is calling the service logger
const callback = upAllMock?.mock?.calls[0][0]?.callback;
expect(callback).toBeDefined();
const message = "test log output";
if (callback) {
callback(Buffer.from(message));
}
expect(upInputs.serviceLogger).toHaveBeenCalledWith("test log output");
});
it("should call up with specific docker flags", async () => {
const upInputs: UpInputs = {
dockerFlags: ["--context", "dev"],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
await service.up(upInputs);
expect(upAllMock).toHaveBeenCalledWith({
composeOptions: [],
commandOptions: [],
config: ["docker-compose.yml"],
executable: {
executablePath: "docker",
options: ["--context", "dev"],
},
cwd: "/current/working/dir",
callback: expect.any(Function),
});
});
it("should call up with specific services", async () => {
const inputs: Inputs = {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["helloworld2", "helloworld3"],
composeFlags: [],
upFlags: ["--build"],
downFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
await service.up(inputs);
await service.up(upInputs);
expect(upManyMock).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
composeOptions: [],
commandOptions: ["--build"],
config: ["docker-compose.yml"],
log: true,
cwd: "/current/working/dir",
callback: expect.any(Function),
executable: {
executablePath: "docker",
options: [],
},
});
});
it("should throw formatted error when upAll fails with docker-compose result", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const dockerComposeError = {
exitCode: 1,
err: "Error: unable to pull image\nfailed to resolve reference",
out: "",
};
upAllMock.mockRejectedValue(dockerComposeError);
await expect(service.up(upInputs)).rejects.toThrow(
"Docker Compose command failed with exit code 1"
);
await expect(service.up(upInputs)).rejects.toThrow("unable to pull image");
});
it("should throw formatted error when upMany fails with docker-compose result", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["web"],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const dockerComposeError = {
exitCode: 1,
err: "Service 'web' failed to start",
out: "Starting web...",
};
upManyMock.mockRejectedValue(dockerComposeError);
await expect(service.up(upInputs)).rejects.toThrow(
"Docker Compose command failed with exit code 1"
);
await expect(service.up(upInputs)).rejects.toThrow("Service 'web' failed to start");
await expect(service.up(upInputs)).rejects.toThrow("Starting web...");
});
it("should pass through docker-compose result without exit code", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const dockerComposeError = {
exitCode: null,
err: "Some error without exit code",
out: "",
};
upAllMock.mockRejectedValue(dockerComposeError);
await expect(service.up(upInputs)).rejects.toThrow("Some error without exit code");
});
it("should pass through standard Error objects", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const standardError = new Error("Standard error message");
upAllMock.mockRejectedValue(standardError);
await expect(service.up(upInputs)).rejects.toThrow("Standard error message");
});
it("should pass through error strings", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const unknownError = "Some unknown error";
upAllMock.mockRejectedValue(unknownError);
await expect(service.up(upInputs)).rejects.toThrow("Some unknown error");
});
it("should handle unknown error types gracefully", async () => {
const upInputs: UpInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const unknownError = { unexpected: "error format" };
upAllMock.mockRejectedValue(unknownError);
await expect(service.up(upInputs)).rejects.toThrow(JSON.stringify(unknownError));
});
});
describe("down", () => {
it("should call down with correct options", async () => {
const inputs: Inputs = {
const downInputs: DownInputs = {
dockerFlags: [],
composeFiles: [],
services: [],
composeFlags: [],
upFlags: [],
downFlags: ["--volumes", "--remove-orphans"],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
await service.down(inputs);
await service.down(downInputs);
expect(downMock).toHaveBeenCalledWith({
composeOptions: [],
commandOptions: ["--volumes", "--remove-orphans"],
config: [],
log: true,
executable: {
executablePath: "docker",
options: [],
},
cwd: "/current/working/dir",
callback: expect.any(Function),
});
});
it("should throw formatted error when down fails with docker-compose result", async () => {
const downInputs: DownInputs = {
dockerFlags: [],
composeFiles: [],
composeFlags: [],
downFlags: [],
cwd: "/current/working/dir",
serviceLogger: jest.fn(),
};
const dockerComposeError = {
exitCode: 1,
err: "Error stopping containers",
out: "",
};
downMock.mockRejectedValue(dockerComposeError);
await expect(service.down(downInputs)).rejects.toThrow(
"Docker Compose command failed with exit code 1"
);
await expect(service.down(downInputs)).rejects.toThrow("Error stopping containers");
});
});
describe("logs", () => {
it("should call logs with correct options", async () => {
const inputs: Inputs = {
const debugMock = jest.fn();
const logsInputs: LogsInputs = {
dockerFlags: [],
composeFiles: ["docker-compose.yml"],
services: ["helloworld2", "helloworld3"],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
serviceLogger: debugMock,
};
logsMock.mockResolvedValue({ exitCode: 0, err: "", out: "logs" });
await service.logs(inputs);
await service.logs(logsInputs);
expect(v2.logs).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
expect(dockerCompose.logs).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
composeOptions: [],
config: ["docker-compose.yml"],
log: true,
cwd: "/current/working/dir",
follow: false,
});
});
});
describe("version", () => {
it("should call version with correct options", async () => {
const inputs: Inputs = {
composeFiles: ["docker-compose.yml"],
services: [],
composeFlags: [],
upFlags: [],
downFlags: [],
cwd: "/current/working/dir",
};
versionMock.mockResolvedValue({
exitCode: 0,
out: "",
err: "",
data: {
version: "1.2.3",
executable: {
executablePath: "docker",
options: [],
},
});
await service.version(inputs);
expect(versionMock).toHaveBeenCalledWith({
composeOptions: [],
config: ["docker-compose.yml"],
log: true,
cwd: "/current/working/dir",
follow: false,
callback: expect.any(Function),
});
});
});

View File

@ -1,37 +1,68 @@
import { IDockerComposeLogOptions, IDockerComposeOptions, v2 } from "docker-compose";
import {
down,
IDockerComposeLogOptions,
IDockerComposeOptions,
IDockerComposeResult,
logs,
upAll,
upMany,
} from "docker-compose";
import { Inputs } from "./input.service";
type OptionsInputs = {
dockerFlags: Inputs["dockerFlags"];
composeFiles: Inputs["composeFiles"];
composeFlags: Inputs["composeFlags"];
cwd: Inputs["cwd"];
serviceLogger: (message: string) => void;
};
export type UpInputs = OptionsInputs & { upFlags: Inputs["upFlags"]; services: Inputs["services"] };
export type DownInputs = OptionsInputs & { downFlags: Inputs["downFlags"] };
export type LogsInputs = OptionsInputs & { services: Inputs["services"] };
export class DockerComposeService {
async up(inputs: Inputs): Promise<void> {
async up({ upFlags, services, ...optionsInputs }: UpInputs): Promise<void> {
const options: IDockerComposeOptions = {
...this.getCommonOptions(inputs),
commandOptions: inputs.upFlags,
...this.getCommonOptions(optionsInputs),
commandOptions: upFlags,
};
if (inputs.services.length > 0) {
await v2.upMany(inputs.services, options);
return;
try {
if (services.length > 0) {
await upMany(services, options);
return;
}
await upAll(options);
} catch (error) {
throw this.formatDockerComposeError(error);
}
await v2.upAll(options);
}
async down(inputs: Inputs): Promise<void> {
async down({ downFlags, ...optionsInputs }: DownInputs): Promise<void> {
const options: IDockerComposeOptions = {
...this.getCommonOptions(inputs),
commandOptions: inputs.downFlags,
...this.getCommonOptions(optionsInputs),
commandOptions: downFlags,
};
await v2.down(options);
try {
await down(options);
} catch (error) {
throw this.formatDockerComposeError(error);
}
}
async logs(inputs: Inputs): Promise<{ error: string; output: string }> {
async logs({ services, ...optionsInputs }: LogsInputs): Promise<{
error: string;
output: string;
}> {
const options: IDockerComposeLogOptions = {
...this.getCommonOptions(inputs),
...this.getCommonOptions(optionsInputs),
follow: false,
};
const { err, out } = await v2.logs(inputs.services, options);
const { err, out } = await logs(services, options);
return {
error: err,
@ -39,17 +70,79 @@ export class DockerComposeService {
};
}
async version(inputs: Inputs): Promise<string> {
const result = await v2.version(this.getCommonOptions(inputs));
return result.data.version;
}
private getCommonOptions(inputs: Inputs): IDockerComposeOptions {
private getCommonOptions({
dockerFlags,
composeFiles,
composeFlags,
cwd,
serviceLogger,
}: OptionsInputs): IDockerComposeOptions {
return {
config: inputs.composeFiles,
log: true,
composeOptions: inputs.composeFlags,
cwd: inputs.cwd,
config: composeFiles,
composeOptions: composeFlags,
cwd: cwd,
callback: (chunk) => serviceLogger(chunk.toString()),
executable: {
executablePath: "docker",
options: dockerFlags,
},
};
}
/**
* Formats docker-compose errors into proper Error objects with readable messages
*/
private formatDockerComposeError(error: unknown): Error {
// If it's already an Error, return it
if (error instanceof Error) {
return error;
}
// Handle docker-compose result objects
if (this.isDockerComposeResult(error)) {
const parts: string[] = [];
// Add exit code information
if (error.exitCode !== null) {
parts.push(`Docker Compose command failed with exit code ${error.exitCode}`);
} else {
parts.push("Docker Compose command failed");
}
// Add error stream output if available
if (error.err && error.err.trim()) {
parts.push("\nError output:");
parts.push(error.err.trim());
}
// Add standard output if available and different from error output
if (error.out && error.out.trim() && error.out !== error.err) {
parts.push("\nStandard output:");
parts.push(error.out.trim());
}
return new Error(parts.join("\n"));
}
// Handle string errors
if (typeof error === "string") {
return new Error(error);
}
// Fallback for unknown error types
return new Error(JSON.stringify(error));
}
/**
* Type guard to check if an object is a docker-compose result
*/
private isDockerComposeResult(error: unknown): error is IDockerComposeResult {
return (
typeof error === "object" &&
error !== null &&
"exitCode" in error &&
"err" in error &&
"out" in error
);
}
}

View File

@ -1,14 +1,7 @@
import { InputService, InputNames } from "./input.service";
import * as core from "@actions/core";
import * as fs from "fs";
jest.mock("fs", () => ({
existsSync: jest.fn(),
promises: {
access: jest.fn(),
},
}));
jest.mock("@actions/core");
import fs from "fs";
import { InputService, InputNames } from "./input.service";
import { LogLevel } from "./logger.service";
describe("InputService", () => {
let service: InputService;
@ -17,11 +10,22 @@ describe("InputService", () => {
let existsSyncMock: jest.SpiedFunction<typeof fs.existsSync>;
beforeEach(() => {
service = new InputService();
jest.clearAllMocks();
existsSyncMock = jest.spyOn(fs, "existsSync").mockImplementation();
getInputMock = jest.spyOn(core, "getInput").mockImplementation();
getMultilineInputMock = jest.spyOn(core, "getMultilineInput").mockImplementation();
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
service = new InputService();
});
afterEach(() => {
@ -29,6 +33,35 @@ describe("InputService", () => {
});
describe("getInputs", () => {
describe("docker-flags", () => {
it("should return given docker-flags input", () => {
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.DockerFlags:
return "docker-flag1 docker-flag2";
default:
return "";
}
});
existsSyncMock.mockReturnValue(true);
const inputs = service.getInputs();
expect(inputs.dockerFlags).toEqual(["docker-flag1", "docker-flag2"]);
});
it("should return empty array when no docker-flags input", () => {
getInputMock.mockReturnValue("");
existsSyncMock.mockReturnValue(true);
const inputs = service.getInputs();
expect(inputs.dockerFlags).toEqual([]);
});
});
describe("composeFiles", () => {
it("should return given composeFiles input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
@ -108,15 +141,6 @@ describe("InputService", () => {
describe("compose-flags", () => {
it("should return given compose-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFlags:
@ -134,15 +158,6 @@ describe("InputService", () => {
});
it("should return empty array when no compose-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockReturnValue("");
existsSyncMock.mockReturnValue(true);
@ -155,15 +170,6 @@ describe("InputService", () => {
describe("up-flags", () => {
it("should return given up-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.UpFlags:
@ -181,15 +187,6 @@ describe("InputService", () => {
});
it("should return empty array when no up-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockReturnValue("");
existsSyncMock.mockReturnValue(true);
@ -202,15 +199,6 @@ describe("InputService", () => {
describe("down-flags", () => {
it("should return given down-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.DownFlags:
@ -228,15 +216,6 @@ describe("InputService", () => {
});
it("should return empty array when no down-flags input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockReturnValue("");
existsSyncMock.mockReturnValue(true);
@ -248,14 +227,6 @@ describe("InputService", () => {
describe("cwd", () => {
it("should return given cwd input", () => {
getMultilineInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeFile:
return ["file1"];
default:
return [];
}
});
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.Cwd:
@ -271,5 +242,71 @@ describe("InputService", () => {
expect(inputs.cwd).toEqual("cwd");
});
});
describe("compose-version", () => {
it("should return given compose-version input", () => {
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ComposeVersion:
return "compose-version";
default:
return "";
}
});
existsSyncMock.mockReturnValue(true);
const inputs = service.getInputs();
expect(inputs.composeVersion).toEqual("compose-version");
});
});
describe("services-log-level", () => {
it("should return given services-log-level input", () => {
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ServiceLogLevel:
return "info";
default:
return "";
}
});
existsSyncMock.mockReturnValue(true);
const inputs = service.getInputs();
expect(inputs.serviceLogLevel).toEqual(LogLevel.Info);
});
it("should return default services-log-level input", () => {
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ServiceLogLevel:
return "";
default:
return "";
}
});
existsSyncMock.mockReturnValue(true);
const inputs = service.getInputs();
expect(inputs.serviceLogLevel).toEqual(LogLevel.Debug);
});
it("should throw an error when services-log-level input is invalid", () => {
getInputMock.mockImplementation((inputName) => {
switch (inputName) {
case InputNames.ServiceLogLevel:
return "invalid-log-level";
default:
return "";
}
});
existsSyncMock.mockReturnValue(true);
expect(() => service.getInputs()).toThrow(
'Invalid service log level "invalid-log-level". Valid values are: debug, info'
);
});
});
});
});

View File

@ -1,37 +1,56 @@
import { getInput, getMultilineInput } from "@actions/core";
import { existsSync } from "fs";
import { join } from "path";
import { LogLevel } from "./logger.service";
export type Inputs = {
dockerFlags: string[];
composeFiles: string[];
services: string[];
composeFlags: string[];
upFlags: string[];
downFlags: string[];
cwd: string;
composeVersion: string | null;
githubToken: string | null;
serviceLogLevel: LogLevel;
};
export enum InputNames {
DockerFlags = "docker-flags",
ComposeFile = "compose-file",
Services = "services",
ComposeFlags = "compose-flags",
UpFlags = "up-flags",
DownFlags = "down-flags",
Cwd = "cwd",
ComposeVersion = "compose-version",
GithubToken = "github-token",
ServiceLogLevel = "services-log-level",
}
export const COMPOSE_VERSION_LATEST = "latest";
export class InputService {
getInputs(): Inputs {
return {
dockerFlags: this.getDockerFlags(),
composeFiles: this.getComposeFiles(),
services: this.getServices(),
composeFlags: this.getComposeFlags(),
upFlags: this.getUpFlags(),
downFlags: this.getDownFlags(),
cwd: this.getCwd(),
composeVersion: this.getComposeVersion(),
githubToken: this.getGithubToken(),
serviceLogLevel: this.getServiceLogLevel(),
};
}
private getDockerFlags(): string[] {
return this.parseFlags(getInput(InputNames.DockerFlags));
}
private getComposeFiles(): string[] {
const cwd = this.getCwd();
const composeFiles = getMultilineInput(InputNames.ComposeFile).filter((composeFile: string) => {
@ -84,4 +103,30 @@ export class InputService {
private getCwd(): string {
return getInput(InputNames.Cwd);
}
private getComposeVersion(): string | null {
return (
getInput(InputNames.ComposeVersion, {
required: false,
}) || null
);
}
private getGithubToken(): string | null {
return (
getInput(InputNames.GithubToken, {
required: false,
}) || null
);
}
private getServiceLogLevel(): LogLevel {
const configuredLevel = getInput(InputNames.ServiceLogLevel, { required: false });
if (configuredLevel && !Object.values(LogLevel).includes(configuredLevel as LogLevel)) {
throw new Error(
`Invalid service log level "${configuredLevel}". Valid values are: ${Object.values(LogLevel).join(", ")}`
);
}
return (configuredLevel as LogLevel) || LogLevel.Debug;
}
}

View File

@ -0,0 +1,3 @@
export interface DockerComposeInstallerAdapter {
install(version: string): Promise<void>;
}

View File

@ -0,0 +1,119 @@
import { ManualInstallerAdapter } from "./manual-installer-adapter";
import * as exec from "@actions/exec";
import * as io from "@actions/io";
import * as toolCache from "@actions/tool-cache";
jest.mock("@actions/exec");
jest.mock("@actions/io");
jest.mock("@actions/tool-cache");
describe("ManualInstallerAdapter", () => {
let mkdirPMock: jest.SpiedFunction<typeof io.mkdirP>;
let execMock: jest.SpiedFunction<typeof exec.exec>;
let cacheFileMock: jest.SpiedFunction<typeof toolCache.cacheFile>;
let downloadToolMock: jest.SpiedFunction<typeof toolCache.downloadTool>;
let adapter: ManualInstallerAdapter;
beforeEach(() => {
mkdirPMock = jest.spyOn(io, "mkdirP").mockImplementation();
execMock = jest.spyOn(exec, "exec").mockImplementation();
cacheFileMock = jest.spyOn(toolCache, "cacheFile").mockImplementation();
downloadToolMock = jest.spyOn(toolCache, "downloadTool").mockImplementation();
adapter = new ManualInstallerAdapter();
});
afterEach(() => {
jest.clearAllMocks();
});
describe("install", () => {
it("should install docker compose correctly", async () => {
// Arrange
const version = "v2.29.0";
// Uname -s
execMock.mockResolvedValueOnce(0);
// Uname -m
execMock.mockResolvedValueOnce(0);
Object.defineProperty(process.env, "HOME", {
value: "/home/test",
});
// Act
await adapter.install(version);
// Assert
expect(mkdirPMock).toHaveBeenCalledWith("docker-compose");
expect(execMock).toHaveBeenNthCalledWith(1, "uname -s", [], {
listeners: { stdout: expect.any(Function) },
});
expect(execMock).toHaveBeenNthCalledWith(2, "uname -m", [], {
listeners: { stdout: expect.any(Function) },
});
expect(downloadToolMock).toHaveBeenCalledWith(
"https://github.com/docker/compose/releases/download/v2.29.0/docker-compose--",
"/home/test/.docker/cli-plugins/docker-compose"
);
expect(cacheFileMock).toHaveBeenCalledWith(
"/home/test/.docker/cli-plugins/docker-compose",
"docker-compose",
"docker-compose",
version
);
});
it("should handle version without 'v' prefix", async () => {
// Arrange
const version = "2.29.0";
// Uname -s
execMock.mockResolvedValueOnce(0);
// Uname -m
execMock.mockResolvedValueOnce(0);
Object.defineProperty(process.env, "HOME", {
value: "/home/test",
});
// Act
await adapter.install(version);
// Assert
expect(mkdirPMock).toHaveBeenCalledWith("docker-compose");
expect(execMock).toHaveBeenNthCalledWith(1, "uname -s", [], {
listeners: { stdout: expect.any(Function) },
});
expect(execMock).toHaveBeenNthCalledWith(2, "uname -m", [], {
listeners: { stdout: expect.any(Function) },
});
expect(downloadToolMock).toHaveBeenCalledWith(
"https://github.com/docker/compose/releases/download/v2.29.0/docker-compose--",
"/home/test/.docker/cli-plugins/docker-compose"
);
});
it("should throw an error if a command fails", async () => {
// Arrange
const version = "v2.29.0";
// Uname -s
execMock.mockResolvedValueOnce(1);
// Act
await expect(adapter.install(version)).rejects.toThrow("Failed to run command: uname -s");
// Assert
expect(execMock).toHaveBeenNthCalledWith(1, "uname -s", [], {
listeners: { stdout: expect.any(Function) },
});
});
});
});

View File

@ -0,0 +1,60 @@
import { exec } from "@actions/exec";
import { mkdirP } from "@actions/io";
import { basename } from "path";
import { cacheFile, downloadTool } from "@actions/tool-cache";
import { DockerComposeInstallerAdapter } from "./docker-compose-installer-adapter";
export class ManualInstallerAdapter implements DockerComposeInstallerAdapter {
async install(version: string): Promise<void> {
const dockerComposePluginPath = await this.getDockerComposePluginPath();
// Create the directory if it doesn't exist
await mkdirP(basename(dockerComposePluginPath));
await this.downloadFile(version, dockerComposePluginPath);
await exec(`chmod +x ${dockerComposePluginPath}`);
await cacheFile(dockerComposePluginPath, "docker-compose", "docker-compose", version);
}
private async getDockerComposePluginPath(): Promise<string> {
const dockerConfig = process.env.DOCKER_CONFIG || `${process.env.HOME}/.docker`;
const dockerComposePluginPath = `${dockerConfig}/cli-plugins/docker-compose`;
return dockerComposePluginPath;
}
private async downloadFile(version: string, installerPath: string): Promise<void> {
if (!version.startsWith("v") && parseInt(version.split(".")[0], 10) >= 2) {
version = `v${version}`;
}
const system = await this.getSystem();
const hardware = await this.getHardware();
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${system}-${hardware}`;
await downloadTool(url, installerPath);
}
private async getSystem(): Promise<string> {
return this.runCommand("uname -s");
}
private async getHardware(): Promise<string> {
return this.runCommand("uname -m");
}
private async runCommand(command: string): Promise<string> {
let output = "";
const result = await exec(command, [], {
listeners: {
stdout: (data: Buffer) => {
output += data.toString();
},
},
});
if (result !== 0) {
throw new Error(`Failed to run command: ${command}`);
}
return output.trim();
}
}

View File

@ -0,0 +1,63 @@
import { LoggerService, LogLevel } from "./logger.service";
import { debug, info, warning } from "@actions/core";
jest.mock("@actions/core", () => ({
warning: jest.fn(),
info: jest.fn(),
debug: jest.fn(),
}));
describe("LoggerService", () => {
let loggerService: LoggerService;
beforeEach(() => {
loggerService = new LoggerService();
});
afterEach(() => {
jest.clearAllMocks();
});
describe("warn", () => {
it("should call warning with the correct message", () => {
const message = "This is a warning message";
loggerService.warn(message);
expect(warning).toHaveBeenCalledWith(message);
});
});
describe("info", () => {
it("should call info with the correct message", () => {
const message = "This is an info message";
loggerService.info(message);
expect(info).toHaveBeenCalledWith(message);
});
});
describe("debug", () => {
it("should call debug with the correct message", () => {
const message = "This is a debug message";
loggerService.debug(message);
expect(debug).toHaveBeenCalledWith(message);
});
});
describe("getServiceLogger", () => {
it("should return the correct logger function for debug level", () => {
const logger = loggerService.getServiceLogger(LogLevel.Debug);
expect(logger).toBe(loggerService.debug);
});
it("should return the correct logger function for info level", () => {
const logger = loggerService.getServiceLogger(LogLevel.Info);
expect(logger).toBe(loggerService.info);
});
it("should default to info level if an unknown level is provided", () => {
const logger = loggerService.getServiceLogger("unknown" as LogLevel);
expect(logger).toBe(loggerService.info);
});
});
});

View File

@ -12,4 +12,20 @@ export class LoggerService {
debug(message: string) {
debug(message);
}
getServiceLogger(level: LogLevel): (message: string) => void {
switch (level) {
case LogLevel.Debug:
return this.debug;
case LogLevel.Info:
return this.info;
default:
return this.info;
}
}
}
export enum LogLevel {
Debug = "debug",
Info = "info",
}