Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
choyshaowei opened this issue Mar 15, 2024 · 2 comments
Labels
bug Something isn't working Stale

Comments

@choyshaowei
Copy link

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.

Copy link
Contributor

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 github-actions bot added the Stale label Mar 17, 2025
Copy link
Contributor

github-actions bot commented Apr 7, 2025

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant