Skip to content

Document how to use array outputs in job conditionals #509

Closed
@pauleustice

Description

@pauleustice

Is your feature request related to a problem? Please describe.

I find that the GitHub documentation around fromJSON/toJSON is not very clear, and it's not always obvious how to use data from github-script steps. I am especially stuck on how to use array outputs to conditionally run steps, which has led to lots of frustration. There is currently no documentation about how to do this, although I'd be happy to contribute some if I knew the answer!

For example (non-working):

- name: Some step
  if: ${{ steps.setArrayOutputs.outputs.jsArray.length > 0 }}

I have tried everything I can think of to get this to work, please see this workflow containing multiple tests (and associated workflow run).

Describe the solution you'd like

Better documentation on how to use data output from the github-script action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionA question on how to use this action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions