Home > Mobile >  workflow_run not working for more than 4 subsequent runs
workflow_run not working for more than 4 subsequent runs

Time:12-30

I am using workflow_run to run my workflow on the completion of other workflows.

but this is not working after 4 subsequent runs.

As you can see in the attached screenshot(https://i.stack.imgur.com/3Q2tU.png) , I have 7 workflows, Test2 should work after completion of Test 1 and Test 3 after Test2 and Test4 after Test3.......

but it's not working after running workflow Test4.

Is this a known limitation ? Can we work around this limit or make the limit higher ?

name: Test5
on:
  workflow_run:
    workflows: ["Test4"]
    types:
      - completed
    branches:
      - main
      - develop
      - experimental/*
      - release/*
      - feature/add_github_actions
jobs:
  on-success5:
    runs-on: ubuntu-latest
    if: ${​​​​​​​{​​​​​​​ github.event.workflow_run.conclusion == 'success' }​​​​​​​}​​​​​​​
    steps:
      - name: Say Hello World
        run: echo "hello world" 

CodePudding user response:

Your implementation is correct, but according to the documentation related to workflow runs, there is a section that states:

You can't use workflow_run to chain together more than three levels of workflows. For example, if you attempt to trigger five workflows (named B to F) to run sequentially after an initial workflow A has run (that is: ABCDEF), workflows E and F will not be run.

Therefore, you won't be able to achieve what you want using workflow_run alone.

Note: A workaround could be to use a dispatch_event to start a new sequence of 3 workflow runs in the 4th workflow.

  • Related