access vars or jobs context in run name or a PUT API for updating run name
Currently the name in workflow run has only access to {{ inputs }} and {{ github }} contexts, which is not very useful as we might want to display additional info which are processed in the job steps.
- either give access to
{{ job }}context. It might solve this as it will update name after the job step is completed (from outputs) - or atleast access the
{{ vars }}context, that we ultimately update in some job steps - If not that then atleast a PUT API endpoint for updating the run's metadata like run-name.
Neither of the above are avaialable 🙂
The users have to go inside every run to check such metadata, because its not displayed in name.
Essentially what differs each run is not just the inputs, but also some processing done from inputs.
For example in my usecase we update our software version for every release run by 1. And we want to display in the run name.
Will appreciate if anyone takes look into this feature ASAP!!!! And many people want this to be fixed.
This issue has become stale and will be closed automatically within a period of time. Sorry about that.
i think this is very useful feature allow update workflow run-name
I would love this feature
Hi GitHub Actions Team,
It would be incredibly beneficial to have the ability to dynamically edit run_name within workflows. This feature would enhance traceability, improve monitoring, and streamline debugging by allowing more descriptive and contextual run identifiers. Please consider adding this functionality to make our CI/CD pipelines even more powerful.
Thank you!
I can confirm that this is working for me. Although the doc says that the run-name has only access to {{ inputs }} and {{ github }} contexts, but when I added a variable at the repository level (under Github secrets) and accessed it using the vars.DEFAULT_ENVIRONMENT surprisingly it worked.
May be this is an undocumented feature ( bit reluctant to post if they remove it after its discovery 😁 ).
on:
push:
branches:
- main
paths:
- 'abcd/**'
workflow_dispatch:
inputs:
environment:
description: 'Choose the deployment environment'
required: false
default: 'DEV'
type: choice
options:
- DEV
- UAT
- PROD
run-name: '${{ github.event.inputs.environment || vars.DEFAULT_ENVIRONMENT }} - Run ID: ${{ github.run_id }} - by @${{ github.actor }}'
It wouldn't be too complicated to modify the run-name at runtime with a Bash script command—this really shouldn't be that hard! 😊