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
15
dist/index.js
vendored
15
dist/index.js
vendored
@ -61838,16 +61838,20 @@ function prepareFpmArgs() {
|
||||
return '';
|
||||
}
|
||||
|
||||
function executeFpmBuild(computedFpmArgs) {
|
||||
function executeFpmBuild(computedFpmArgs, debug) {
|
||||
|
||||
const userFpmArgs = core.getInput('fpm_args');
|
||||
const dockerCmd = 'docker run --rm -i'
|
||||
+ ' -v ' + process.cwd() + ':/workspace/source'
|
||||
+ ` -v "${process.cwd()}:/workspace/source"`
|
||||
+ ' -w /workspace/source'
|
||||
+ 'gitea.dhswt.de/actions/fpm:master'
|
||||
+ ' gitea.dhswt.de/actions/fpm:master'
|
||||
+ ' ' + computedFpmArgs
|
||||
+ ' ' + userFpmArgs;
|
||||
|
||||
if (debug) {
|
||||
console.log('docker command: ', dockerCmd);
|
||||
}
|
||||
|
||||
const proc = external_child_process_default().spawnSync(dockerCmd, {
|
||||
shell: true,
|
||||
stdio: 'inherit',
|
||||
@ -61890,11 +61894,8 @@ try {
|
||||
const debug = lib_isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||
|
||||
const fpmArgs = prepareFpmArgs();
|
||||
if (debug) {
|
||||
console.log('fpmArgs:', JSON.stringify(fpmArgs, null, 2));
|
||||
}
|
||||
|
||||
executeFpmBuild(fpmArgs);
|
||||
executeFpmBuild(fpmArgs, debug);
|
||||
}
|
||||
catch (error) {
|
||||
console.log('Failed to fpm packages', error);
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import * as action_information from 'information';
|
||||
import {
|
||||
executeFpmBuild,
|
||||
isTrueString, prepareFpmArgs
|
||||
} from './lib';
|
||||
import {executeFpmBuild, isTrueString, prepareFpmArgs} from './lib';
|
||||
|
||||
|
||||
try {
|
||||
@ -16,11 +13,8 @@ try {
|
||||
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||
|
||||
const fpmArgs = prepareFpmArgs();
|
||||
if (debug) {
|
||||
console.log('fpmArgs:', JSON.stringify(fpmArgs, null, 2));
|
||||
}
|
||||
|
||||
executeFpmBuild(fpmArgs);
|
||||
executeFpmBuild(fpmArgs, debug);
|
||||
}
|
||||
catch (error) {
|
||||
console.log('Failed to fpm packages', error);
|
||||
|
||||
10
src/lib.js
10
src/lib.js
@ -5,16 +5,20 @@ export function prepareFpmArgs() {
|
||||
return '';
|
||||
}
|
||||
|
||||
export function executeFpmBuild(computedFpmArgs) {
|
||||
export function executeFpmBuild(computedFpmArgs, debug) {
|
||||
|
||||
const userFpmArgs = core.getInput('fpm_args');
|
||||
const dockerCmd = 'docker run --rm -i'
|
||||
+ ' -v ' + process.cwd() + ':/workspace/source'
|
||||
+ ` -v "${process.cwd()}:/workspace/source"`
|
||||
+ ' -w /workspace/source'
|
||||
+ 'gitea.dhswt.de/actions/fpm:master'
|
||||
+ ' gitea.dhswt.de/actions/fpm:master'
|
||||
+ ' ' + computedFpmArgs
|
||||
+ ' ' + userFpmArgs;
|
||||
|
||||
if (debug) {
|
||||
console.log('docker command: ', dockerCmd);
|
||||
}
|
||||
|
||||
const proc = child_process.spawnSync(dockerCmd, {
|
||||
shell: true,
|
||||
stdio: 'inherit',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user