core.error() does not fail the workflow
See original GitHub issueAccording to https://github.com/actions/toolkit/tree/main/packages/core#annotations this code should fail the build: core.error('Fatal error')
. It does not. The workflow succeeds.
jobs:
fail:
runs-on: ubuntu-latest
steps:
- name: Fail workflow
uses: actions/github-script@v6.0.0
with:
script: core.error('Fatal error')
I can see the annotation on the actions page but not on the pull request page. Also I get a green checkmark indicating that the workflow was successfull.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to fail a job in Github Actions? - Stack Overflow
As part of the workflow, I have to check whether 2 environment variables are equal. If they don't - fail the job. As...
Read more >Fix error "[CORE_0003] An internal exception occurred with ...
[CORE_0003] An internal exception occurred with message: [LGS_10052] The Log Service has no record of the requested session or workflow run.
Read more >Troubleshoot and diagnose workflow failures - Azure Logic Apps
If the trigger doesn't fire, try the following steps. ... Review the inputs, outputs, and any error messages for the failed step.
Read more >Job and Tool Error Help - Galaxy Community Hub
The cluster error help is server specific for Galaxy Main at ... Did the job fail with some comments that are not descriptive...
Read more >Dealing with Failures - Metaflow Docs
Failures are a natural, expected part of data science workflows. Here are some typical reasons why you can expect your workflow to fail:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it does.
@T3rm1 does this work if you use
core.setFailed
instead?https://github.com/actions/toolkit/blob/b5f31bb5a25d129441c294fc81ba7f92f3e978ba/packages/core/src/core.ts#L208-L217