Reusable Workflows, Jobs outputs

I’m trying to implement reusable workflow as described here: Reusing workflows - GitHub Docs

on the workflow I have following jobs (simplified):

    name: Get Deployment Config
    runs-on: ubuntu-latest
      config: ${{ steps.get-config.outputs.config }}
      - name: Get Config
        uses: action000
        id: get-config

      - run: |
          echo '${{ steps.get-config.outputs.config }}' # returns value

    needs: [get-config]
    name: ccccc
    runs-on: ubuntu-latest
      - run: |
          echo '${{ needs.get-config.outputs.config }}' # empty string

It seems like needs does not work inside of called workflow.

I understand that the docs stands for some limitations:

  • Outputs generated by a called workflow can’t be accessed by the caller workflow.

Not sure if this is a case given I’m trying to access outputs locally.

Is config a secret? I had this problem trying to output a secret in the first job otherwise it should work as I am using a similar setup in our workflows. In my case there was a line in the raw log complaining about the secret being used in an output.

No, it’s not.

As you can also see that the config output was set successfully on get-config job.

I also tried to use job outputs, indeed needs.*.outputs are empty in myjobb. The hardcoded output myin is not a secret so this must be a bug of the github actions beta.

Here my public workflow run, which prints an empty needs context in myjobb.

While running it with my own action service implementation locally the same workflow has the expected outputs in the needs context.

I think that mforutan’s experience is about normal workflows, not about reusable workflows. Reusable workflows are documented since last Tuesday.

1 Like

Fixed as of Today, I can confirm job outputs are now printed to the log

It’s not that github wouldn’t apply changes to the actions-service at any point of time, like between our posts

Awesome, works for me too!