One way to accomplish that, for example in GitHub, would be to use GitHub Actions.
You can create an action that runs on a push, i.e. to a branch, and run the workflow. From the action you can post comments to the PR stream where you can publish the link to the logs or results.
To "clone" the workflow would be akin to creating a new branch, editing whatever makes sense in the code (or parameters to the tasks) and pushing that branch to the server.
Please note that the workflow will run with the server credentials, so you may need to add some server-side verification. Also, from the push you can trigger other services or webhooks.
Other git providers, such as GitLab, have similar mechanisms.
Hope this helps.