-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
29 lines (20 loc) · 939 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const core = require('@actions/core');
const execSync = require('child_process').execSync;
// most @actions toolkit packages have async methods
async function run() {
try {
let output = execSync('ls', {encoding: 'utf-8'}); // the default is 'buffer'
console.log('ls Output was:\n', output);
output = execSync('pwd', {encoding: 'utf-8'}); // the default is 'buffer'
console.log('Pwd Output was:\n', output);
output = execSync('env', {encoding: 'utf-8'}); // the default is 'buffer'
console.log('Env Output was:\n', output);
output = execSync('/home/runner/work/_actions/nurmi/anchore-scan-action/master/inline_scan-v0.5.0', {encoding: 'utf-8'});
console.log('ILS Output was:\n', output);
core.debug((new Date()).toTimeString());
core.setOutput('time', new Date().toTimeString());
} catch (error) {
core.setFailed(error.message);
}
}
run();