79408804

Date: 2025-02-03 12:30:46
Score: 1
Natty:
Report link

As @lyzlisa stated, it does not work for env variable at the same level, but it does work if you reuse a top level env variable in a lower level env variable definition:

env:
  SOME_GLOBAL_VAR: 1.0.0
jobs:
  build:
    name: My build
    env:
      SOME_BUILD_VAR: "${{ env.SOME_GLOBAL_VAR }}-build"
    steps:
      - name: My step
        env:
          SOME_STEP_VAR: "${{ env.SOME_GLOBAL_VAR }} ${{ env.SOME_BUILD_VAR}} step 1"
        run:
          ...
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @lyzlisa
  • Low reputation (0.5):
Posted by: Flo