Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 3

Workflow on PR labeled action always fails if there is already OK workflow for the same commit

Solved! Go to Solution.

Workflow on pull_request labeled action always fails if there is already completed workflow for the same commit.

 

Failed workflow is displayed in "Actions" tab but is not even accessible, click on the failed workflow (that was triggered by labeled action) always opens completed workflow (that was triggered by open or synchronize action).

 

Screenshot_2019-11-20 researchspace researchspace.pngScreenshot_2019-11-20 researchspace researchspace(1).png

 

see config https://github.com/researchspace/researchspace/blob/github-actions-ci/.github/workflows/main.yml

2 Replies
Solution
GitHub Partner
Message 2 of 3

Re: Workflow on PR labeled action always fails if there is already OK workflow for the same commit

@aindlq ,

 

The workflow run triggered by PR labeled to be failed is not caused by the previous completed workflow run, the root cause is an incorrect syntax to get the label name on the if condition.
The correct syntax should be:

if: github.event.action != 'labeled' || github.event.label.name == 'build_image'
Copilot Lvl 2
Message 3 of 3

Re: Workflow on PR labeled action always fails if there is already OK workflow for the same commit

@BrightRan  thanks, that fixed the problem?

 

What confused me is that it was not possible to access failed build at all, it always redirected to the successful one.