Workflow_run 'success' type reference

I’m trying to use the GitHub workflow ‘on’ trigger, to daisy-chain multiple workflows together.

I can use the workflow_run event to trigger the next workflow, however, I want to have more granularity. For example, I only want to trigger the next workflow, if the previous one completed successfully, not just that the workflow itself completed.

on:
  workflow_run:
    workflows: ["Workflow1"]
    branches: [master]
    types: 
      - completed
      - **success** (THIS STATUS DOES NOT EXIST)
    check_run:
      types: [completed]
      conclusion: [success]

There doesn’t seem to be a ‘success’ status for the workflow_run event, but there is one for the check_run even (which is restricted to the current workflow, not a different one.

Does anyone know if this logic is supported? And if so, what am I missing in the YAML syntax?

@AErmie ,

Currently, the workflow_run event only includes two activity types “requested” and “completed”. It does not support to filter the conclusion of the depended workflow.
About the activity type “completed”, once the depended workflow is completed, regardless of whether it is success or failure, the workflow_run event will trigger another workflow.

As a workaround, you can set the job level if conditional like as below:

name: Workflow2
on:
  workflow_run:
    workflows: ["Workflow1"]
    branches: [master]
    types: 
      - completed
jobs:
  job1:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}

  job2:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}

    . . .

  jobN:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}

In this way, all the jobs in Workflow2 will run only when Workflow1 is completed successfully. Otherwise, all the jobs will be skipped.
Note: This will not skip triggering Workflow2, just skip all the jobs after Workflow2 started.

In addition, the check_run event is not suitable in your case.

If you really need the feature that the activity types of the workflow_run event can support more status of workflow run such as success and failure, I recommend that you can directly report a feature request here.
That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.