Skip to content

Commit 9976501

Browse files
committed
docs; use docker compose wording instead of docker-compose
1 parent 0807b14 commit 9976501

File tree

6 files changed

+52
-35
lines changed

6 files changed

+52
-35
lines changed

.github/ghadocs/examples/2_services.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- markdownlint-disable-next-line first-line-heading -->
22
### Example using `services`
33

4-
Perform `docker-compose up` to some given service instead of all of them
4+
Perform `docker compose up` to some given service instead of all of them
55

66
```yaml
77
steps:
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- markdownlint-disable-next-line first-line-heading -->
22
### Example using `up-flags`
33

4-
Specify flags to pass to the `docker-compose up`. Default is none. Can be used
4+
Specify flags to pass to the `docker compose up`. Default is none. Can be used
55
to pass the `--build` flag, for example, if you want persistent volumes to be
66
deleted as well during cleanup. A full list of flags can be found in the
7-
[docker-compose up documentation](https://docs.docker.com/compose/reference/up/).
7+
[docker compose up documentation](https://docs.docker.com/compose/reference/up/).

.github/ghadocs/examples/5_compose-flags.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- markdownlint-disable-next-line first-line-heading -->
22
### Example using `compose-flags`
33

4-
Specify flags to pass to the `docker-compose` command. Default is none. A full
4+
Specify flags to pass to the `docker compose` command. Default is none. A full
55
list of flags can be found in the
6-
[docker-compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
6+
[docker compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
77

88
```yaml
99
steps:

.github/workflows/__check-action.yml

+17
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,20 @@ jobs:
254254
echo "Docker compose version is not in $DOCKER_COMPOSE_VERSION version"
255255
exit 1
256256
fi
257+
258+
test-action-with-docker-context:
259+
runs-on: ubuntu-latest
260+
name: Test with docker context
261+
steps:
262+
- uses: actions/checkout@v4
263+
264+
- name: Set up Docker
265+
uses: docker/setup-docker-action@v4
266+
with:
267+
context: test-context
268+
269+
- name: Act
270+
uses: ./
271+
with:
272+
compose-file: "./test/docker-compose.yml"
273+
compose-version: "latest"

README.md

+24-24
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</div>
2020
<!-- start description -->
2121

22-
This action runs your docker-compose file and clean up before action finished
22+
This action runs your [docker compose](https://docs.docker.com/reference/compose-file/) file and clean up before action finished
2323

2424
<!-- end description -->
2525

@@ -30,16 +30,16 @@ This action runs your docker-compose file and clean up before action finished
3030

3131
### Action
3232

33-
The action will run `docker-compose up` to start the services defined in the given compose file(s).
33+
The action will run `docker compose up` to start the services defined in the given compose file(s).
3434
The compose file(s) can be specified using the `compose-file` input.
35-
Some extra options can be passed to the `docker-compose up` command using the `up-flags` input.
35+
Some extra options can be passed to the `docker compose up` command using the `up-flags` input.
3636

3737
### Post hook
3838

39-
On post hook, the action will run `docker-compose down` to clean up the services.
39+
On post hook, the action will run `docker compose down` to clean up the services.
4040
In [debug mode](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging), the logs of the running services are printed before the cleanup.
4141

42-
Some extra options can be passed to the `docker-compose down` command using the `down-flags` input.
42+
Some extra options can be passed to the `docker compose down` command using the `down-flags` input.
4343

4444
<!-- start usage -->
4545

@@ -52,21 +52,21 @@ Some extra options can be passed to the `docker-compose down` command using the
5252
# Default: ./docker-compose.yml
5353
compose-file: ""
5454

55-
# Description: Services to perform docker-compose up.
55+
# Description: Services to perform docker compose up.
5656
#
5757
services: ""
5858

59-
# Description: Additional options to pass to `docker-compose up` command.
59+
# Description: Additional options to pass to `docker compose up` command.
6060
#
6161
# Default:
6262
up-flags: ""
6363

64-
# Description: Additional options to pass to `docker-compose down` command.
64+
# Description: Additional options to pass to `docker compose down` command.
6565
#
6666
# Default:
6767
down-flags: ""
6868

69-
# Description: Additional options to pass to `docker-compose` command.
69+
# Description: Additional options to pass to `docker compose` command.
7070
#
7171
# Default:
7272
compose-flags: ""
@@ -82,7 +82,7 @@ Some extra options can be passed to the `docker-compose down` command using the
8282
compose-version: ""
8383

8484
# Description: The GitHub token used to create an authenticated client (to fetch
85-
# the latest version of docker-compose).
85+
# the latest version of docker compose).
8686
#
8787
# Default: ${{ github.token }}
8888
github-token: ""
@@ -97,13 +97,13 @@ Some extra options can be passed to the `docker-compose down` command using the
9797
| **Input** | **Description** | **Default** | **Required** |
9898
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | ------------ |
9999
| <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** |
100-
| <code>services</code> | Services to perform docker-compose up. | | **false** |
101-
| <code>up-flags</code> | Additional options to pass to <code>docker-compose up</code> command. | | **false** |
102-
| <code>down-flags</code> | Additional options to pass to <code>docker-compose down</code> command. | | **false** |
103-
| <code>compose-flags</code> | Additional options to pass to <code>docker-compose</code> command. | | **false** |
100+
| <code>services</code> | Services to perform docker compose up. | | **false** |
101+
| <code>up-flags</code> | Additional options to pass to <code>docker compose up</code> command. | | **false** |
102+
| <code>down-flags</code> | Additional options to pass to <code>docker compose down</code> command. | | **false** |
103+
| <code>compose-flags</code> | Additional options to pass to <code>docker compose</code> command. | | **false** |
104104
| <code>cwd</code> | Current working directory | <code>${{ github.workspace }}</code> | **false** |
105105
| <code>compose-version</code> | Compose version to use.<br />If null (default), it will use the current installed version.<br />If "latest", it will install the latest version. | | **false** |
106-
| <code>github-token</code> | The GitHub token used to create an authenticated client (to fetch the latest version of docker-compose). | <code>${{ github.token }}</code> | **false** |
106+
| <code>github-token</code> | The GitHub token used to create an authenticated client (to fetch the latest version of docker compose). | <code>${{ github.token }}</code> | **false** |
107107
108108
<!-- end inputs -->
109109
<!-- start outputs -->
@@ -125,14 +125,14 @@ jobs:
125125
steps:
126126
- uses: actions/checkout@v4
127127

128-
- name: Run docker-compose
128+
- name: Run docker compose
129129
uses: hoverkraft-tech/compose-action@v2.0.1
130130
with:
131131
compose-file: "./docker/docker-compose.yml"
132132

133133
- name: Execute tests in the running services
134134
run: |
135-
docker-compose exec test-app pytest
135+
docker compose exec test-app pytest
136136
```
137137
138138
<!-- start [.github/ghadocs/examples/] -->
@@ -152,7 +152,7 @@ steps:
152152
153153
### Example using `services`
154154

155-
Perform `docker-compose up` to some given service instead of all of them
155+
Perform `docker compose up` to some given service instead of all of them
156156

157157
```yaml
158158
steps:
@@ -168,24 +168,24 @@ steps:
168168

169169
### Example using `up-flags`
170170

171-
Specify flags to pass to the `docker-compose up`. Default is none. Can be used
171+
Specify flags to pass to the `docker compose up`. Default is none. Can be used
172172
to pass the `--build` flag, for example, if you want persistent volumes to be
173173
deleted as well during cleanup. A full list of flags can be found in the
174-
[docker-compose up documentation](https://docs.docker.com/compose/reference/up/).
174+
[docker compose up documentation](https://docs.docker.com/compose/reference/up/).
175175

176176
### Example using `down-flags`
177177

178-
Specify flags to pass to the `docker-compose down` command during cleanup.
178+
Specify flags to pass to the `docker compose down` command during cleanup.
179179
Default is none. Can be used to pass the `--volumes` flag, for example, if you
180180
want persistent volumes to be deleted as well during cleanup. A full list of
181181
flags can be found in the
182-
[docker-compose down documentation](https://docs.docker.com/compose/reference/down/).
182+
[docker compose down documentation](https://docs.docker.com/compose/reference/down/).
183183

184184
### Example using `compose-flags`
185185

186-
Specify flags to pass to the `docker-compose` command. Default is none. A full
186+
Specify flags to pass to the `docker compose` command. Default is none. A full
187187
list of flags can be found in the
188-
[docker-compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
188+
[docker compose documentation](https://docs.docker.com/compose/reference/#command-options-overview-and-help).
189189

190190
```yaml
191191
steps:

action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Docker Compose Action"
2-
description: "This action runs your docker-compose file and clean up before action finished"
2+
description: "This action runs your compose file and clean up before action finished"
33
author: "Hoverkraft"
44
branding:
55
icon: anchor
@@ -11,18 +11,18 @@ inputs:
1111
required: false
1212
default: "./docker-compose.yml"
1313
services:
14-
description: "Services to perform docker-compose up."
14+
description: "Services to perform docker compose up."
1515
required: false
1616
up-flags:
17-
description: "Additional options to pass to `docker-compose up` command."
17+
description: "Additional options to pass to `docker compose up` command."
1818
required: false
1919
default: ""
2020
down-flags:
21-
description: "Additional options to pass to `docker-compose down` command."
21+
description: "Additional options to pass to `docker compose down` command."
2222
required: false
2323
default: ""
2424
compose-flags:
25-
description: "Additional options to pass to `docker-compose` command."
25+
description: "Additional options to pass to `docker compose` command."
2626
required: false
2727
default: ""
2828
cwd:
@@ -36,7 +36,7 @@ inputs:
3636
If "latest", it will install the latest version.
3737
required: false
3838
github-token:
39-
description: The GitHub token used to create an authenticated client (to fetch the latest version of docker-compose).
39+
description: The GitHub token used to create an authenticated client (to fetch the latest version of docker compose).
4040
default: ${{ github.token }}
4141
required: false
4242

0 commit comments

Comments
 (0)