mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
lib.ts: adjust status logging levels (#1033)
GitHub reports when workflow runs log messages with `notice` or higher logging levels, e.g.: > There are 0 failures, 0 warnings, and 1 notices. Since `notice` was being used regardless of status, these reports were misleading, because everything was working correctly on successes and no-ops. Therefore, the successes and no-ops now only log with `info`, and the failures now only log with `notice`.
This commit is contained in:
parent
76a601a392
commit
642a7979da
17
src/lib.ts
17
src/lib.ts
@ -73,16 +73,13 @@ export default async function run(
|
|||||||
|
|
||||||
setFailed(extractErrorMessage(error))
|
setFailed(extractErrorMessage(error))
|
||||||
} finally {
|
} finally {
|
||||||
const terminationMessage = `${
|
if (status === Status.FAILED) {
|
||||||
status === Status.FAILED
|
notice('Deployment failed! ❌')
|
||||||
? 'Deployment failed! ❌'
|
} else if (status === Status.SUCCESS) {
|
||||||
: status === Status.SUCCESS
|
info('Completed deployment successfully! ✅')
|
||||||
? 'Completed deployment successfully! ✅'
|
} else {
|
||||||
: 'There is nothing to commit. Exiting early… 📭'
|
info('There is nothing to commit. Exiting early… 📭')
|
||||||
}`
|
}
|
||||||
|
|
||||||
info(terminationMessage)
|
|
||||||
notice(terminationMessage)
|
|
||||||
|
|
||||||
exportVariable('deployment_status', status)
|
exportVariable('deployment_status', status)
|
||||||
setOutput('deployment-status', status)
|
setOutput('deployment-status', status)
|
||||||
|
Loading…
Reference in New Issue
Block a user