2020-05-09 21:50:47 +07:00
|
|
|
import { setFailed, startGroup, endGroup } from '@actions/core'
|
2020-05-08 13:06:16 +07:00
|
|
|
import { Inputs } from '../inputs'
|
2020-05-08 11:29:39 +07:00
|
|
|
import runSelfInstaller from './run'
|
|
|
|
|
|
|
|
export { runSelfInstaller }
|
|
|
|
|
2020-05-08 13:06:16 +07:00
|
|
|
export async function install(inputs: Inputs) {
|
2020-05-09 21:50:47 +07:00
|
|
|
startGroup('Running self-installer...')
|
2020-05-08 13:06:16 +07:00
|
|
|
const status = await runSelfInstaller(inputs)
|
2020-05-09 21:50:47 +07:00
|
|
|
endGroup()
|
2020-05-08 11:29:39 +07:00
|
|
|
if (status) {
|
2021-10-12 13:34:10 +02:00
|
|
|
return setFailed(`Something went wrong, self-installer exits with code ${status}`)
|
2020-05-08 11:29:39 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default install
|