Reputation: 10243
Using GitHub Actions we have a workflow (deploy.yaml
) that can be triggered both manually and as a result of a push event:
on:
push:
branches: ["master"]
workflow_dispatch:
inputs:
env:
description: 'env'
required: true
type: choice
options: ...
When this workflow is executed due to push event, the run is named as the HEAD commit... but if the workflow is executed manually, the run uses the name of the yaml file (deploy
in this scenario)
Is it possible to name a run that has been triggered manually?
Upvotes: 3
Views: 2292
Reputation: 337
Support for this feature was added to GitHub Actions on Sep 26, 2022
As of Sep 3, 2022, it appears that this is not possible. There is an unanswered feature request discussion on the GitHub Actions community forum, but no apparent decision has yet been made.
Upvotes: 3
Reputation: 1354
This feature is now live from September 26, 2022
Simply specify the run-name
which accepts expressions:
run-name: Deploy to ${{ github.event.inputs.env }} by @${{ github.actor }}
on:
push:
branches: ["master"]
workflow_dispatch:
inputs:
env:
description: 'env'
required: true
type: choice
options: ...
For further info see the documentation
Upvotes: 1