Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Make docker-compose cwd aware #35

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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