prefix relative context dir with path to workspace

This commit is contained in:
2023-12-24 14:40:27 +01:00
parent c2c9a6f265
commit 29ca9c0278
2 changed files with 16 additions and 9 deletions
+6 -4
View File
@@ -169,12 +169,14 @@ export function prepareDestinations(registries, tags) {
}
export function getDockerContextDir() {
if (isNonEmptyStr(core.getInput('docker_context_dir'))) {
return core.getInput('docker_context_dir');
}
else {
let contextDir = core.getInput('docker_context_dir');
if (!isNonEmptyStr(core.getInput('docker_context_dir'))) {
return process.env['GITHUB_WORKSPACE'];
}
if (!contextDir.startsWith('/')) {
contextDir = process.env['GITHUB_WORKSPACE'] + '/' + contextDir;
}
return contextDir;
}
export function prepareDockerArgs(destinations) {