runner icon indicating copy to clipboard operation
runner copied to clipboard

GitHub Actions Bug: ${{ github.workflow }} Context Variable Causes Child Workflow Runs to Be Prematurely Canceled

Open choyshaowei opened this issue 1 year ago • 1 comments

Describe the bug GitHub Actions ${{ github.workflow }} incorrectly returns the parent workflow's name in child workflows. This causes child workflows to be grouped under the same concurrency group as the parent, leading to unintended cancellations of child workflow runs due to perceived deadlocks.

To Reproduce Steps to reproduce the behavior:

  1. Create a parent workflow that triggers on pull requests and calls child workflows.
  2. Define concurrency groups using ${{ github.workflow }}-${{ github.ref }}.
  3. Trigger the workflow by opening a pull request.
  4. Observe that after the first child workflow run starts, subsequent runs are canceled.

Expected behavior Each child workflow should have its own concurrency group based on its workflow file name, allowing all child workflows to run independently without being prematurely canceled.

Runner Version and Platform

Version: GitHub Enterprise Server 3.9.10 Platform: GitHub-self-hosted runners

OS of the machine running the runner? Linux

What's not working?

Subsequent child workflow runs are canceled, with logs indicating a deadlock in the concurrency group.

choyshaowei avatar Mar 15 '24 03:03 choyshaowei

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Mar 17 '25 00:03 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Apr 07 '25 00:04 github-actions[bot]