Skip to content

Check Outputted List is Empty? #27085

Discussion options

You must be logged in to vote

GitHub Actions expressions are fairly limited and I haven’t seen a length function to this day.

However, in this case you can simply compare the output, which is a JSON string, to the JSON string for an empty array:

...
  build:
    needs: changes
    if: needs.changes.outputs.packages != '[]'
...

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
2 replies
@Simran-B
Comment options

@dmitry-stepanenko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
3 participants