diff --git a/README.md b/README.md index e62c690..31be0b1 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ The action comes with additional options that you can use to configure your proj | dontautocreate | false | Set this to true if you don't want to automatically create the Heroku app | true or false | | dontuseforce | false | Set this to true if you don't want to use --force when switching branches | true or false | | usedocker | false | Will deploy using Dockerfile in project root | true or false | -| docker_heroku_process_type | false | Type of heroku process (web, worker, etc). This option only makes sense when usedocker enabled. Defaults to "web" (Thanks to [singleton11](https://github.com/singleton11) for adding this feature) | web, worker | +| docker_heroku_process_type | false | Type of heroku process (web, worker, etc). This option only makes sense when usedocker enabled. Defaults to "web" (Thanks to [singleton11](https://github.com/singleton11) for adding this feature). Supports the --recursive argument to build and push multiple images by renaming your Dockerfiles to Dockerfile.{process} | web, worker | | docker_build_args | false | A list of args to pass into the Docker build. This option only makes sense when usedocker enabled. | NODE_ENV | | appdir | false | Set if your app is located in a subdirectory | api, apis/python | | healthcheck | false | A URL to which a healthcheck is performed (checks for 200 request) | https://demo-rest-api.herokuapp.com | diff --git a/index.js b/index.js index 2f5bee2..53313d6 100644 --- a/index.js +++ b/index.js @@ -73,9 +73,11 @@ const deploy = ({ appdir, }) => { const force = !dontuseforce ? "--force" : ""; + const recursive = (Object.prototype.toString.call(dockerHerokuProcessType) === '[object String]' + && dockerHerokuProcessType.indexOf(' ') >= 0) ? "--recursive" : ""; if (usedocker) { execSync( - `heroku container:push ${dockerHerokuProcessType} --app ${app_name} ${dockerBuildArgs}`, + `heroku container:push ${dockerHerokuProcessType} --app ${app_name} ${dockerBuildArgs} ${recursive}`, appdir ? { cwd: appdir } : null ); execSync(