Optional additional workflow after success

Hi,

I have a build & test workflow that runs after opening a Github Pull request. Once the tests have completed, it shows a green “Completed” status (which is of course what I want).

There are certain circumstances where I might want to run an additional series of jobs. e.g. for certain PRs I might want to sometimes kick off a build based on that branch’s code, so that I can test on a device/in a test environment.

My options here seem to be:

  1. Always run the “deploy to test” job => costly and makes the test pipeline much slower
  2. Add an ‘approval’ step => This means that PRs will never show a “completed” status, which confuses people and creates bad habits

Is there a better way to achieve this? Ideally I want to be able to create an optional series of jobs, but still return a “success” status.