Le 09/02/2021 à 19:28, Jarek Potiuk a écrit : > Yes. I noticed this misleading line and I will update the docs shortly. It > should be """"Cancels duplicate runs from all running workflow *runs of the > workflow the action acts on*.""" > > The action is written in the way that it always acts on a single workflow. > > By default this is indeed the same workflow as the one run by action. But > there are few ways it can be a different workflow: > > 1) In most cases (especially when you want to enable canceling for Pull > Requests from forks), the action should be run "workflow_run" event. And > this even has two workflows "the source one" (for example pull_request) and > "the target one" (this is the workflow that the cancel action should be > part of). If you specify "${{ github.event.workflow_run.id }}" as > sourceRunId - then the action will act on the "Source" workflow instead of > the default "target one".
Er... so "source" workflow is the triggering workflow, and "target" workflow is the cancelling workflow? Or is it something else? I'm afraid all those explanations are a bit confusing to me :-) > 2) You can explicitly specify the "workflowFileName" as I did in Pulsar - > then the action will act on the specified workflow. > > It would be possible to add a feature to the action to run on "array of > workflowFileNames" - It is possible, and not very complex, but I decided > not to do it, as it is just a slight improvement over the copy&pasting the > action to workflow file several times (As I did in pulsar). The "array of workflowFileNames" would be quite welcome for us, because right now the amount of copy / pasting is a bit unwiedly, and it's very easy to make an error: https://github.com/apache/arrow/pull/9455/files I would gladly try to make a PR, but my Javascript competence is approximately zero, unfortunately. :-S Best regards Antoine.