fix missing whitespace in docker build, add debug output of docker command to be executed
All checks were successful
Docker Build / docker-build (push) Successful in 1m28s
All checks were successful
Docker Build / docker-build (push) Successful in 1m28s
This commit is contained in:
parent
f2c22cea9b
commit
ddc730cf35
17
dist/index.js
vendored
17
dist/index.js
vendored
@ -61838,16 +61838,20 @@ function prepareFpmArgs() {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function executeFpmBuild(computedFpmArgs) {
|
function executeFpmBuild(computedFpmArgs, debug) {
|
||||||
|
|
||||||
const userFpmArgs = core.getInput('fpm_args');
|
const userFpmArgs = core.getInput('fpm_args');
|
||||||
const dockerCmd = 'docker run --rm -i'
|
const dockerCmd = 'docker run --rm -i'
|
||||||
+ ' -v ' + process.cwd() + ':/workspace/source'
|
+ ` -v "${process.cwd()}:/workspace/source"`
|
||||||
+ ' -w /workspace/source'
|
+ ' -w /workspace/source'
|
||||||
+ 'gitea.dhswt.de/actions/fpm:master'
|
+ ' gitea.dhswt.de/actions/fpm:master'
|
||||||
+ ' ' + computedFpmArgs
|
+ ' ' + computedFpmArgs
|
||||||
+ ' ' + userFpmArgs;
|
+ ' ' + userFpmArgs;
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
console.log('docker command: ', dockerCmd);
|
||||||
|
}
|
||||||
|
|
||||||
const proc = external_child_process_default().spawnSync(dockerCmd, {
|
const proc = external_child_process_default().spawnSync(dockerCmd, {
|
||||||
shell: true,
|
shell: true,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
@ -61887,14 +61891,11 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const information = collect_all(true, false);
|
const information = collect_all(true, false);
|
||||||
const debug = lib_isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
const debug = lib_isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||||
|
|
||||||
const fpmArgs = prepareFpmArgs();
|
const fpmArgs = prepareFpmArgs();
|
||||||
if (debug) {
|
|
||||||
console.log('fpmArgs:', JSON.stringify(fpmArgs, null, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
executeFpmBuild(fpmArgs);
|
executeFpmBuild(fpmArgs, debug);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.log('Failed to fpm packages', error);
|
console.log('Failed to fpm packages', error);
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
import * as action_information from 'information';
|
import * as action_information from 'information';
|
||||||
import {
|
import {executeFpmBuild, isTrueString, prepareFpmArgs} from './lib';
|
||||||
executeFpmBuild,
|
|
||||||
isTrueString, prepareFpmArgs
|
|
||||||
} from './lib';
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -13,14 +10,11 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const information = action_information.collect_all(true, false);
|
const information = action_information.collect_all(true, false);
|
||||||
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||||
|
|
||||||
const fpmArgs = prepareFpmArgs();
|
const fpmArgs = prepareFpmArgs();
|
||||||
if (debug) {
|
|
||||||
console.log('fpmArgs:', JSON.stringify(fpmArgs, null, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
executeFpmBuild(fpmArgs);
|
executeFpmBuild(fpmArgs, debug);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.log('Failed to fpm packages', error);
|
console.log('Failed to fpm packages', error);
|
||||||
|
|||||||
10
src/lib.js
10
src/lib.js
@ -5,16 +5,20 @@ export function prepareFpmArgs() {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function executeFpmBuild(computedFpmArgs) {
|
export function executeFpmBuild(computedFpmArgs, debug) {
|
||||||
|
|
||||||
const userFpmArgs = core.getInput('fpm_args');
|
const userFpmArgs = core.getInput('fpm_args');
|
||||||
const dockerCmd = 'docker run --rm -i'
|
const dockerCmd = 'docker run --rm -i'
|
||||||
+ ' -v ' + process.cwd() + ':/workspace/source'
|
+ ` -v "${process.cwd()}:/workspace/source"`
|
||||||
+ ' -w /workspace/source'
|
+ ' -w /workspace/source'
|
||||||
+ 'gitea.dhswt.de/actions/fpm:master'
|
+ ' gitea.dhswt.de/actions/fpm:master'
|
||||||
+ ' ' + computedFpmArgs
|
+ ' ' + computedFpmArgs
|
||||||
+ ' ' + userFpmArgs;
|
+ ' ' + userFpmArgs;
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
console.log('docker command: ', dockerCmd);
|
||||||
|
}
|
||||||
|
|
||||||
const proc = child_process.spawnSync(dockerCmd, {
|
const proc = child_process.spawnSync(dockerCmd, {
|
||||||
shell: true,
|
shell: true,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user