Github actions dynamic workflow name

Viewed 3679

I have a manually triggered job that builds and deploys an image based on the tag I specify. Is there a way to make the workflow name dynamic?

name: Build and push

on:
  workflow_dispatch:
    inputs:
      tag:
        description: 'Image Tag'
        required: true

jobs:
...

I would like to do something like

name: "Build and push ${{ github.event.inputs.tag }}"
1 Answers

Workflow names are not dynamic, but fixed.

To get at the actual data of a workflow run, you'll have to chose the specific run from the Actions > All Workflows > [name-of-your-workflow] list.

Alternatively, you can think about other ways to propagate the outcomes of your builds.

  • Our team, for example, propagates build outcomes to teams chat channel (in our case Microsoft Teams using the action notify-microsoft-teams). If you search the market place you'll find plenty of actions for this.
  • Another alternative could be to generated custom badges, which you could then make visible to your team. A nice action for this is bring-your-own-badge.
  • Last but not least you can propagate your workflow run data using emails (again, there are actions which do this for you).
Related