Details on workflow_run

I found that there is a way to trigger one workflow from another using workflow_run. Unfortunately the docs on it are minimalistic - to put it nicely.

name: Publish
on:
  workflow_run:
    workflows: ["CI"]
    branches: [master]
    types:
      - completed

Question I have that don’t seem to be addressed:

  • What types are available?
  • There is branches, but can I also filter so it only runs for (certain) tags?
  • Does completed mean “successfully completed”?
  • It seems workflows is an array of workflow names?
  • What types are available?

Looks like requested or completed.

  • There is branches , but can I also filter so it only runs for (certain) tags?

The docs don’t seem specific. Other events definitely support tags. I’d suggest just try and see what happens.

  • Does completed mean “successfully completed”?

No this seems to be solely that the job actually finished. For success/failure you’d have to check status or conclusion. Docs here > https://developer.github.com/v3/actions/workflow-runs/

  • It seems workflows is an array of workflow names?

Yes, so for the example you included above the “Publish” workflow would run after “CI” completed.

Looks like requested or completed .

Question is - are those really all?

The docs don’t seem specific. Other events definitely support tags. I’d suggest just try and see what happens.

A lot of trying out to figure things out with github actions :-/

No this seems to be solely that the job actually finished.

You would think there was a type for it :-/

Thanks!

Ya, maybe someone else will chime in that’s seen it specifically in docs or already tried it. I haven’t, but I have had to try a tonne of other things :wink: