Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide an entry point for trigger events to facilitate dispatch work…
…flow This simple entry point workflow should funnel event webhooks to the dispatch workflow IF the event is deemed an actual test event. This combined with the decoupled dispatch workflow is how PRs will still be able to trigger testing without needing manual running of the dispatch workflow. Likewise, it will stop unnecessary skipped job statuses from showing up on the PR. The status of this workflow will inevitably be constantly overriden from multiple label events, but the published commit status of the dispatch workflow, if queued, will provide the handle to the run via a target_url. Since the workflow_dispatch webhook event cannot take a pull request merge ref, certain measures must be taken to allow running the workflow in a valid context. For PRs originating from forks, it is impossible to run the workflow in the parent repo using the head ref as that branch exists in a different repo. In this case we will run the base ref of the PR. This has the added benefit of security, ensuring the runners never run workflows from outside sources. Unfortunately, this would limit critical patches to the workflow from being demonstated within a PR. To allow for this use case, when a PR from an internal repo branch is used, the dispatch event will be made using the PR branch head ref, thus running the changes. This paradigm will also guarantee that the workflow_dispatch will only ever use internal refs, increasing security and allowing label modifications.
- Loading branch information