Thanks to visit codestin.com
Credit goes to github.com

Skip to content

job.name expression not evaluated when job skipped #1215

@JackIngleton

Description

@JackIngleton

Describe the bug
When a job is skipped, expressions used in the job.name field are not evaluated.

To Reproduce

  1. Create a repository with the following workflow:
name: Example Workflow
on:
  workflow_dispatch:
jobs:
  Services:
    if: false == true
    name: ${{ github.job }}
    runs-on: ubuntu-latest
    steps:
      - name: Hello World
        run: echo Hello World
  1. Run the workflow manually.

Expected behavior
The job name should be replaced with the value from the evaluated expression, e.g. Services in this example.

Runner Version and Platform

Current runner version: '2.278.0'
Operating System
  Ubuntu
  20.04.2
  LTS
Virtual Environment
  Environment: ubuntu-20.04
  Version: 20210718.1
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20210718.1/images/linux/Ubuntu2004-README.md
  Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20210718.1

What's not working?

The expression is not evaluated, and instead the job name is set to the string of the expression:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions