-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathaction.yml
More file actions
70 lines (68 loc) · 2.59 KB
/
Copy pathaction.yml
File metadata and controls
70 lines (68 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ### 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 compose file(s) and clean up before action finished
author: "hoverkraft"
branding:
icon: anchor
color: blue
inputs:
docker-flags:
description: "Additional options to pass to `docker` command."
required: false
compose-file:
description: "Path to compose file(s). It can be a list of files. It can be absolute or relative to the current working directory (cwd), or an OCI artifact reference starting with `oci://`."
required: false
default: "./docker-compose.yml"
services:
description: "Services to perform `docker compose up`."
required: false
up-flags:
description: "Additional options to pass to `docker compose up` command."
required: false
default: ""
down-flags:
description: "Additional options to pass to `docker compose down` command."
required: false
default: ""
compose-flags:
description: "Additional options to pass to `docker compose` command."
required: false
default: ""
cwd:
description: "Current working directory"
required: false
default: ${{ github.workspace }}
compose-version:
description: |
Compose version to use.
If null (default), it will use the current installed version.
If "latest", it will install the latest version.
required: false
services-log-level:
description: |
The log level used for Docker Compose service logs.
Can be one of "debug", "info".
required: false
default: "debug"
github-token:
description: The GitHub token used to create an authenticated client (to fetch the latest version of Docker Compose).
default: ${{ github.token }}
required: false
runs:
using: node24
main: dist/index.js
post: dist/post.js