actions / actions/runner

`workflow_run` triggered on `[completed]` receives `run-name` (aka `display_title`) as `name` in `event`

Open
#4,141 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
When workflow is triggered as workflow_run on [completed] it receives run-name as name in the event. workflow_run object.

To Reproduce
Steps to reproduce the behavior:

Create 2 workflows:

  1. To trigger
name: Test workflow
run-name: Unexpected value

on:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - run: echo 1
  1. To watch for workflow run:
name: WF Run
on:
  workflow_run:
    workflows:
      - Test workflow
    types:
      - requested
      - completed
jobs:
  export:
    runs-on: ubuntu-latest
    steps:
      - run: |
          echo "name          = '${{ github.event.workflow_run.name }}'"
          echo "display_title = '${{ github.event.workflow_run.display_title }}'"

On requested it outputs:

name          = 'Test workflow'
display_title = 'Test workflow'

And on completed:

name          = 'Unexpected value'
display_title = 'Unexpected value'

Expected behavior
Expecting to see name in the workflow_run.name and run-name in github.event.workflow_run.display_title.

Runner Version and Platform

Version of your runner? Latest

OS of the machine running the runner? Ubuntu

What's not working?

Outputs run-name instead of name in the event object.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the two workflow YAML examples, comparing the requested and completed workflow_run event outputs on Ubuntu. Trace how the runner application constructs the event object; done means workflow_run.name remains Test workflow and display_title contains Unexpected value for the completed run.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.