Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔨 show STDOUT when deployment failed on Action #151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ async function run(): Promise<void> {
settings.tenant = core.getInput('tenant')
settings.clientId = core.getInput('clientId')
settings.clientSecret = core.getInput('clientSecret')
settings.addAppInsightsStep = core.getInput('addAppInsightsStep') === true || core.getInput('addAppInsightsStep') === 'true'
settings.renumberSteps = core.getInput('renumberSteps') === true || core.getInput('renumberSteps') === 'true'
settings.verbose = core.getInput('verbose') === true || core.getInput('verbose') === 'true'
settings.addAppInsightsStep = core.getInput('addAppInsightsStep') === true || core.getInput('addAppInsightsStep') === 'true'
settings.renumberSteps = core.getInput('renumberSteps') === true || core.getInput('renumberSteps') === 'true'
settings.verbose = core.getInput('verbose') === true || core.getInput('verbose') === 'true'
let deploymentType = DeploymentType.None

core.info('Deploy custom policy GitHub Action v5.3 started.')
Expand Down Expand Up @@ -137,7 +137,6 @@ async function run(): Promise<void> {

// Replace yourtenant.onmicrosoft.com with the tenant name parameter
if (policyXML.indexOf("yourtenant.onmicrosoft.com") > 0) {
//core.info(`Policy ${filePath} replacing yourtenant.onmicrosoft.com with ${tenant}.`)
policyXML = policyXML.replace(new RegExp("yourtenant.onmicrosoft.com", "gi"), settings.tenant)
}

Expand Down Expand Up @@ -178,6 +177,8 @@ async function run(): Promise<void> {
}

} catch (error: any) {
core.info(`Deployment Failed`)
core.info(error)
const errorText = error.message ?? error
core.setFailed(errorText)
}
Expand Down