Support existing behavior of this action

This commit is contained in:
Jess Bees
2022-03-29 10:05:17 -04:00
parent a598b2af14
commit 32b8b86ff0
4 changed files with 13 additions and 6 deletions

View File

@@ -53,8 +53,12 @@ process.on('SIGTERM', cancelHandler)
// Main
// Boolean inputs are stringified, but manually convert this input just in case that changes in the future.
if (core.getInput("emit_telemetry").toString() === "true") {
const emitTelemetry = core.getInput("emit_telemetry").toString();
if (emitTelemetry === "true") {
require('./pre')
} else {
} else if (emitTelemetry === "false") {
main()
} else {
// If emit_telemetry is not set, that indicates an older version of the dynamic workflow that doesn't separate telemetry from deployment
main().then(() => require('./pre'))
}