Skip to content

Commit

Permalink
Fix: Make docker-compose cwd aware
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloconnor committed Dec 8, 2023
1 parent 178aeba commit ffe16df
Show file tree
Hide file tree
Showing 34 changed files with 289 additions and 2,612 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,34 @@ jobs:
- run: npm install
- uses: ./
with:
compose-file: "./docker/docker-compose.yml"
compose-file: "${{ github.workspace }}/docker/docker-compose.yml"
cwd: "${{ github.workspace }}"
services: |
helloworld2
helloworld3
- uses: ./
with:
compose-file: "./docker/docker-compose.yml"
cwd: "${{ github.workspace }}"
down-flags: "--volumes"
- uses: ./
with:
compose-file: "./docker/docker-compose.yml"
compose-flags: "--profile profile-1"
cwd: "${{ github.workspace }}"
down-flags: "--volumes"
- uses: ./
with:
compose-file: "./docker/docker-compose-with-env.yml"
cwd: "${{ github.workspace }}"
env:
IMAGE_NAME: hello-world
- uses: ./
with:
compose-file: |
./docker/docker-compose.yml
./docker/docker-compose.ci.yml
cwd: "${{ github.workspace }}"
services: |
helloworld2
helloworld4
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: "additional options to pass to `docker-compose` command"
required: false
default: ""
cwd: # id of input
description: "Current working directory"
required: false
default: ""
down-flags: # id of input
description: "additional options to pass to `docker-compose down` command"
required: false
Expand Down
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ try {

const options = {
config: composeFiles,
cwd: core.getInput("cwd"),
log: true,
composeOptions: utils.parseFlags(core.getInput("compose-flags")),
commandOptions: utils.parseFlags(core.getInput("up-flags")),
Expand Down
6 changes: 3 additions & 3 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

171 changes: 171 additions & 0 deletions node_modules/.yarn-integrity

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/acorn-jsx/node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/cross-spawn/node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions node_modules/docker-compose/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions node_modules/docker-compose/community-samples/readme.md

This file was deleted.

137 changes: 0 additions & 137 deletions node_modules/docker-compose/dist/src/index.d.ts

This file was deleted.

Loading

0 comments on commit ffe16df

Please sign in to comment.