26 lines
725 B
JavaScript
26 lines
725 B
JavaScript
import * as core from '@actions/core';
|
|
import * as github from '@actions/github';
|
|
import * as action_information from 'information';
|
|
import {executeFpmBuild, installFpmViaRuby, isTrueString, prepareFpmArgs} from './lib';
|
|
|
|
|
|
try {
|
|
if (isTrueString(core.getBooleanInput('debug_log_github_context'))) {
|
|
console.log(JSON.stringify(github.context, null, 2));
|
|
}
|
|
|
|
const information = action_information.collect_all(true, false);
|
|
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
|
|
|
const fpmArgs = prepareFpmArgs();
|
|
|
|
await installFpmViaRuby();
|
|
|
|
executeFpmBuild(fpmArgs, debug);
|
|
}
|
|
catch (error) {
|
|
console.log('Failed to fpm packages', error);
|
|
core.setFailed(error.message);
|
|
process.exit(1);
|
|
}
|