I was excited to see that composite actions can now uses `uses`, until

… until I found out that if still can’t be used. So there’s no way to skip a uses step within a composite action if it’s not needed.

My use case is a “setup tools” action that will install and setup caches for the versions of PHP, Composer, Node, and Pnpm we need by reading them from a config file in the repo. But some actions only need PHP or Node, it’d be nice to skip installing the one we don’t need.

For those who haven’t seen the announcement yet: GitHub Actions: Reduce duplication with action composition | GitHub Changelog


Same for me, couldn’t wait to build my first composite action only to find out:
Unexpected value 'if'

Why is if not supported? This is a must have to make real composite actions.

@anomiex Maybe good to rephrase the title of this post to something like: Composite actions don't allow if conditions. This way it’s easier to find.

There is an issue about this in the actions/runner repository: