Consider GitLab CI/CD pipeline consisting of two consequent stages: A and B.

If stage A succeeds, I want stage B to be executed automatically.
But if stage A fails, I don't want stage B to be executed automatically, but still have a possibility to force execute stage B manually.

How can I achive that?