fix: Add docker-compose to PATH (#274)

* Expose command as `docker-compose`

* Format and package
This commit is contained in:
Tibo Delor
2021-09-01 12:29:50 +10:00
committed by GitHub
parent f73439ca62
commit ecd3566c81
4 changed files with 27 additions and 6 deletions

5
dist/index.js vendored
View File

@@ -43,7 +43,8 @@ function installOnLinux(version) {
const url = `https://github.com/docker/compose/releases/download/${version}/docker-compose-${yield system}-${yield hardware}`;
const installerPath = yield (0, tool_cache_1.downloadTool)(url);
yield (0, exec_1.exec)(`chmod +x ${installerPath}`);
return installerPath;
const cachedPath = yield (0, tool_cache_1.cacheFile)(installerPath, 'docker-compose', 'docker-compose', version);
return cachedPath;
});
}
function install(version) {
@@ -107,7 +108,7 @@ function run() {
core.addPath(commandPath);
}
catch (error) {
core.setFailed(error instanceof Error ? error.message : "Unknown error");
core.setFailed(error instanceof Error ? error.message : 'Unknown error');
}
});
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long