GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • community
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles

This view

  • Original page
  • New address

GeezerVison is showing github.com — On: workflow_run: does not work for me · community · Discussion #25288

@community GitHub Community

On: workflow_run: does not work for me #25288

Answered by BrightRan
sblantipodi asked this question in Actions
On: workflow_run: does not work for me #25288
@sblantipodi sblantipodi
Aug 24, 2020 · 12 comments · 6 replies
Answered by BrightRan Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

sblantipodi
Aug 24, 2020

Hi all,
I have a workflow that is triggered on release

name: CreateRelease

on:
release:
types: [published]

and a workflow that should be triggered after the CreateRelease workflow runned

name: GitHub Linux Release

on:
workflow_run:
workflows: ["CreateRelease"]
branches: [master]
types:
- completed
- requested

second workflow is never triggered, why? thanks!

I want to create a release in a workflow triggered by a tag push,
after the release has been created, I want to trigger two workflow that build the linux and windows build.

how can I do it?

You must be logged in to vote
All reactions
Answered by BrightRan Aug 25, 2020

@sblantipodi,

Is the workflow “GitHub Linux Release” existing on the master or default branch?
To trigger a workflow runs on the workflow_run event, the workflow file should exist on the master or default branch.

Here is a recent reported similar topic as reference:

<a href="https://github.community/t/workflow-runs-not-starting-after-previous-workflow-completes/128345/8">Workflow runs not starting after previous workflow completes</a> <a class="badge-wrapper  bullet" href="/c/code-to-cloud/github-actions/41"><span class="badge-category-parent-bg" style="background-color: #6a737d;"></span><span class="badge-category-bg" style="background-color: #2188ff;"></span><span style="" data-drop-c…
View full answer

Replies: 12 comments · 6 replies

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

BrightRan
Aug 25, 2020

@sblantipodi,

Is the workflow “GitHub Linux Release” existing on the master or default branch?
To trigger a workflow runs on the workflow_run event, the workflow file should exist on the master or default branch.

Here is a recent reported similar topic as reference:

<a href="https://github.community/t/workflow-runs-not-starting-after-previous-workflow-completes/128345/8">Workflow runs not starting after previous workflow completes</a> <a class="badge-wrapper  bullet" href="/c/code-to-cloud/github-actions/41"><span class="badge-category-parent-bg" style="background-color: #6a737d;"></span><span class="badge-category-bg" style="background-color: #2188ff;"></span><span style="" data-drop-close="true" class="badge-category clear-badge" title="Discussion and questions about GitHub Actions—automation for all of your development workflows, now with world-class CI/CD.">GitHub Actions</span></a>
@andrewconnell, There are few points maybe can explain the problems:

The workflow runs on workflow_run event must exist on the master or default branch. And this workflow will only run on the master or default branch, regardless of whether it is triggered by a workflow run on other branches or not.

On the Actions page of a repository, under the “All workflows”, generally the following workflows are listed:

The workflow files exist on any branches, and the workflows have been triggered …

In addition, if you want the workflow “GitHub Linux Release” is triggered after the workflow “CreateRelease” completed, you should only use the type “completed”.

If the problem still exists, please share your repository with us (if possible), so that we can check more detailed configurations related to the workflows to analyze the root cause.

You must be logged in to vote
All reactions
  • ❤️ 7
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

sblantipodi
Aug 26, 2020
Author

thanks for the answer, at the end I solved using a multi job workflow. but I understood your suggestion, thanks for the help. love GitHub and its community.

You must be logged in to vote
All reactions
1 reply
@umassahu
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

umassahu Oct 21, 2022

@sblantipodi : please let me know how did you solved this and what changes you have done w.r.t the example which you have given

All reactions
  • 👍 2
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

mundusnine
Oct 9, 2020

I encountered the issue on my repo here.

So the workflows exist on the master but the default branch cant be the master because we depend on another functionality(wei/pull) to pull from the project that is forked.

Any suggestions as to why this would happen or how I could remedy it ?

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Simran-B
Oct 10, 2020

The workflow dispatch UI on the website has a drop-down menu to select a branch. Maybe put some placeholder workflow on the default branch and the real workflow on the desired branch (here: master), with the exact name file name?

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

mundusnine
Oct 16, 2020

Ok so I am managing everything on the default branch now as actions on master don’t work like they should.

Now the issue I am having is all the Windows actions get run but as soon as the last windows one is done(WindowsLibd3d12) the one that depends on that one(html5 library) doesn’t get called.

Could it be related to the fact that they use a different platform(one windows and the other ubuntu) or is it because libd3d12 is the last file and html5 library is the first file in the folder hierarchy ?

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

mundusnine
Oct 16, 2020

So after doing a Test it seems to be that workflow_run is capped at max 3 subsequent runs ? that is weird

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Simran-B
Oct 16, 2020

It could be a deliberate limit to prevent endless loops of workflows being triggered, but if this is actually a restriction then it should be documented.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

jamesamcl
Oct 29, 2021

Have also just hit this undocumented arbitrary limit of 3 consecutive runs using on workflow_run.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Yuqing-cat
Feb 22, 2022

Met The same problem and find its in the following document: Events that trigger workflows - GitHub Docs: Note: This event will only trigger a workflow run if the workflow file is on the default branch.

image
image3005×1543 386 KB
You must be logged in to vote
All reactions
5 replies
@jbcpollak
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

jbcpollak Aug 9, 2022

does this mean the workflow will only run on the default branch?

All reactions
  • 👀 1
@swahili95
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

swahili95 Jul 17, 2024

yes

All reactions
  • 👎 1
@FredFlitsPaal
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Uh oh!

    There was an error while loading. Please reload this page.

FredFlitsPaal Mar 31, 2025

I finally figured it out for myself: it is not true the workflow only runs on de default branch. But it has to be on the default branch in order to execute the workflow_run trigger on any branch.

All reactions
@sanjpras
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

sanjpras Apr 3, 2025

@FredFlitsPaal how were you able to do this? I have the workflow_run trigger on different branches, but the workflow only runs for the default branch.

All reactions
@FredFlitsPaal
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

FredFlitsPaal Apr 4, 2025

I have the following on the default branch. Indenting is gone sorry about that.
on: workflow_run: workflows: ["Run unit tests"] types: - completed

Since this is present in the workflow file on the default branch, it works on other branches as well as long as the workflow filename is not changed.

All reactions
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

christopher-graham
May 5, 2023

I am also seeing this issue, was there a resolution to it?

My workflow files are all on the master (default) branch and I am not seeing my test workflow run after the initial build workflow completes.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

95rade
Sep 22, 2023

Is it possible to use workflow_run: trigger from a workflow in different repository? I think this is more of a 'real use case' scenario.

You must be logged in to vote
All reactions
0 replies
Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

balinteu
May 26, 2025

Unfortunately almost 5 years after this post Github still has not changed the way workflow_run behaves. Workflow_run can be triggered from any branch, but the targeted workflow will always be executed on the default branch.

To fix this behaviour and actually do what I (and most of us) expect it to do, I added the followiong to the checkout action:

  • name: Checkout Repository
    uses: actions/checkout@v4
    with:
    ref: ${{ github.event.workflow_run.head_branch }}

This checks out the branch from which the workflow_run call is being made.

Yes I had to first add everything into the main branch, yes it is annoying and confusing, but it is what it is.

You must be logged in to vote
All reactions
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🚢
Actions
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
14 participants
@sblantipodi @jbcpollak @jamesamcl @FredFlitsPaal @Simran-B @balinteu @95rade @Yuqing-cat @mundusnine @BrightRan @christopher-graham @umassahu @sanjpras @swahili95
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.