GitHub action - display the branch name to the build name

Viewed 1081
1 Answers

I had a quick test and unfortunately, it is not possible to use any context or interpolation in the workflow name. You can however dynamically name the jobs in the workflow:

name: 'My workflow' # This name has to be hardcoded

on: [workflow_dispatch]

# or if you need inputs
#
# on:
#  workflow_dispatch:
#    inputs:
#      myinput:
#        description: 'What your input does'
#        required: true

jobs:
  myjob:
    name: ${{ github.ref }}
    runs-on: ubuntu-latest
    steps: [...]

But it won't show up on the list of runs in the Actions page of your repo.

Related