Label driven Pull Request workflow not working according to requirement

  • I have created a label-driven PR workflow, i.e. when a specific named label (‘Run Workflow’) is added to the PR, then only the workflow will run.

  • I have also added status checks to my main branch, to make sure that any code is not merged to the main branch until the PR workflow succeeds.

Combining both of the above two requirements is not giving me the desired results.
When my PR is created, if it doesn’t have the ‘Run Workflow’ label, then the workflow is skipped and it shows the ‘All checks have passed’, Hence I am able to merge my PR without actually running the workflow with it.

Requirement -

  1. Unless the workflow succeeds, the PR should be blocked from merging.

Please find the screenshots below