mirror of
https://github.com/kitabisa/docker-slim-action.git
synced 2025-04-14 18:56:05 +00:00
fix: unable to locate executable file err
cuz the binary is wraps in directory Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
parent
adc0faf08f
commit
da3b74f054
7
dist/index.js
vendored
7
dist/index.js
vendored
@ -94,7 +94,7 @@ function get_slim() {
|
||||
const_1.core.notice(`slim ${VER} found in cache`);
|
||||
}
|
||||
else {
|
||||
slimPath = const_1.path.join(process.env.GITHUB_WORKSPACE, '../', 'slim');
|
||||
const parentWorkspace = const_1.path.join(process.env.GITHUB_WORKSPACE, '../');
|
||||
let srcPath;
|
||||
try {
|
||||
const_1.core.debug(`Downloading slim ${VER} for ${KERNEL}/${MACHINE}...`);
|
||||
@ -107,15 +107,16 @@ function get_slim() {
|
||||
try {
|
||||
const_1.core.debug(`Extracting slim ${VER}...`);
|
||||
if (EXT === 'zip') {
|
||||
extractedPath = yield const_1.tc.extractZip(srcPath, slimPath);
|
||||
extractedPath = yield const_1.tc.extractZip(srcPath, parentWorkspace);
|
||||
}
|
||||
else { // tar.gz
|
||||
extractedPath = yield const_1.tc.extractTar(srcPath, slimPath);
|
||||
extractedPath = yield const_1.tc.extractTar(srcPath, parentWorkspace);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`Could not extract slim: ${error.message}`);
|
||||
}
|
||||
extractedPath = const_1.path.join(extractedPath, DIST);
|
||||
const_1.core.debug('Caching slim...');
|
||||
slimPath = yield const_1.tc.cacheDir(extractedPath, 'slim', VER, MACHINE);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ async function get_slim() {
|
||||
if (slimPath) {
|
||||
core.notice(`slim ${VER} found in cache`)
|
||||
} else {
|
||||
slimPath = path.join(process.env.GITHUB_WORKSPACE, '../', 'slim')
|
||||
const parentWorkspace = path.join(process.env.GITHUB_WORKSPACE, '../')
|
||||
|
||||
let srcPath
|
||||
try {
|
||||
@ -102,13 +102,14 @@ async function get_slim() {
|
||||
try {
|
||||
core.debug(`Extracting slim ${VER}...`)
|
||||
if (EXT === 'zip') {
|
||||
extractedPath = await tc.extractZip(srcPath, slimPath)
|
||||
extractedPath = await tc.extractZip(srcPath, parentWorkspace)
|
||||
} else { // tar.gz
|
||||
extractedPath = await tc.extractTar(srcPath, slimPath)
|
||||
extractedPath = await tc.extractTar(srcPath, parentWorkspace)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`Could not extract slim: ${error.message}`)
|
||||
}
|
||||
extractedPath = path.join(extractedPath, DIST)
|
||||
|
||||
core.debug('Caching slim...')
|
||||
slimPath = await tc.cacheDir(extractedPath, 'slim', VER, MACHINE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user