Merge pull request #10 from actions/update/build-error-message

Update error message for no artifact found
This commit is contained in:
Mingzi
2022-01-12 13:15:06 -08:00
committed by GitHub
5 changed files with 8 additions and 8 deletions

4
dist/index.js vendored
View File

@@ -7082,7 +7082,7 @@ class Deployment {
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
if (data.value.length == 0) { if (data.value.length == 0) {
throw new Error('No uploaded artifact was found!') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step.')
} }
const artifactUrl = `${data.value[0].url}&%24expand=SignedContent` const artifactUrl = `${data.value[0].url}&%24expand=SignedContent`
const payload = { const payload = {
@@ -7118,7 +7118,7 @@ class Deployment {
const statusUrl = this.deploymentInfo != null ? const statusUrl = this.deploymentInfo != null ?
this.deploymentInfo["status_url"] : this.deploymentInfo["status_url"] :
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}` `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : ""); core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "")
const timeout = core.getInput('timeout') const timeout = core.getInput('timeout')
const reportingInterval = core.getInput('reporting_interval') const reportingInterval = core.getInput('reporting_interval')
const maxErrorCount = core.getInput('error_count') const maxErrorCount = core.getInput('error_count')

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -7082,7 +7082,7 @@ class Deployment {
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
if (data.value.length == 0) { if (data.value.length == 0) {
throw new Error('No uploaded artifact was found!') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step.')
} }
const artifactUrl = `${data.value[0].url}&%24expand=SignedContent` const artifactUrl = `${data.value[0].url}&%24expand=SignedContent`
const payload = { const payload = {
@@ -7118,7 +7118,7 @@ class Deployment {
const statusUrl = this.deploymentInfo != null ? const statusUrl = this.deploymentInfo != null ?
this.deploymentInfo["status_url"] : this.deploymentInfo["status_url"] :
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}` `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : ""); core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "")
const timeout = core.getInput('timeout') const timeout = core.getInput('timeout')
const reportingInterval = core.getInput('reporting_interval') const reportingInterval = core.getInput('reporting_interval')
const maxErrorCount = core.getInput('error_count') const maxErrorCount = core.getInput('error_count')

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ class Deployment {
}) })
core.info(JSON.stringify(data)) core.info(JSON.stringify(data))
if (data.value.length == 0) { if (data.value.length == 0) {
throw new Error('No uploaded artifact was found!') throw new Error('No uploaded artifact was found! Please check if there are any errors at build step.')
} }
const artifactUrl = `${data.value[0].url}&%24expand=SignedContent` const artifactUrl = `${data.value[0].url}&%24expand=SignedContent`
const payload = { const payload = {
@@ -74,7 +74,7 @@ class Deployment {
const statusUrl = this.deploymentInfo != null ? const statusUrl = this.deploymentInfo != null ?
this.deploymentInfo["status_url"] : this.deploymentInfo["status_url"] :
`https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}` `https://api.github.com/repos/${this.repositoryNwo}/pages/deployment/status/${process.env['GITHUB_SHA']}`
core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : ""); core.setOutput('page_url', this.deploymentInfo != null ? this.deploymentInfo["page_url"] : "")
const timeout = core.getInput('timeout') const timeout = core.getInput('timeout')
const reportingInterval = core.getInput('reporting_interval') const reportingInterval = core.getInput('reporting_interval')
const maxErrorCount = core.getInput('error_count') const maxErrorCount = core.getInput('error_count')