Using step variables (job/environment, inputs) in step path/directory

Currently it's not possible to use step variables (job/environment, inputs) in step paths/directories.

Examples

Some examples, which are not working:

Job environment variable

job:test:
    variables:
        TEST_DIR: .gitlab-ci
    run:
        - name: test_job_variable
          step: ./${{job.TEST_DIR}}/step/someStep

Steps inputs

spec:
    inputs:
        testDir:
            type: string
            default: .gitlab-ci
---
run:
    - name: test_steps_inputs
      step: ./${{inputs.testDir}}/step/someStep

Usage

Possibility to define a base step directory or specific (sub-)steps e.g. depend on environment variables.

See also: #582908 #582910 (closed) #582912 (closed) #582913 (closed)

Edited by 🤖 GitLab Bot 🤖