Skip to content

Commit

Permalink
change require to include v2
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarrosrom committed Aug 6, 2024
1 parent 3d5d8c8 commit c5e3b15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { v2 as compose } from 'docker-compose'

const { v2 } = require("docker-compose");
const core = require("@actions/core");
const utils = require("./utils");
//const path = require("path");
Expand All @@ -23,8 +22,8 @@ try {

const promise =
services.length > 0
? compose.upMany(services, options)
: compose.upAll(options);
? v2.upMany(services, options)
: v2.upAll(options);

promise
.then(() => {
Expand All @@ -40,7 +39,7 @@ try {

if (testCommand && testContainer) {
setTimeout(() => {
const test = compose.exec(testContainer, testCommand, {
const test = v2.exec(testContainer, testCommand, {
config: composeFiles,
});

Expand Down
5 changes: 2 additions & 3 deletions post.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { v2 as compose } from 'docker-compose'

const { v2 } = require("docker-compose");
const core = require("@actions/core");
const utils = require("./utils");

Expand All @@ -18,7 +17,7 @@ try {
commandOptions: utils.parseFlags(core.getInput("down-flags")),
};

compose.down(options).then(
v2.down(options).then(
() => {
console.log("compose removed");
},
Expand Down

0 comments on commit c5e3b15

Please sign in to comment.