Needs.job.outputs issue

Share in my pain, please! :cry:

How can an output from one job, work in any property OR inside the whole job, but NOT work in its if property…

cd:
    needs: ci
    if: ${{ needs.ci.outputs.new_version }} == '' # is ignored...
    runs-on: windows-latest
    env:
      NEW_VERSION: ${{ needs.ci.outputs.new_version }} # works
    steps:
      - name: Checkout repository
        id: checkout_repo
        uses: actions/checkout@v2 

      - run: echo ${{ needs.ci.outputs.new_version }} # works

Am I doing something wrong ?

You need to either wrap the whole expression in ${{ ... }}, or (only for if!) omit it as described in About contexts and expressions.

1 Like

Yeah… I just realized that about ten lines above, I am doing it properly and here my mind just blanked I guess… Thank you for waking me up a bit! :slight_smile:

it is late… :smiley:

1 Like