It's hard to tell what works and what doesn't. For instance, simple expressions in the positional name argument {% octicon {{ foo.bar }} %}
seem to work, but anything more complicated doesn't. Attributes are even tricker. I've never gotten this to work, for instance:
{% octicon file-directory class:"fill-{{ color }}" %}
Instead, I've resorted to some awful hacks to work around a failure to interpolate values from the "outer" Liquid context:
{% capture octo %}{% octicon file-directory class:"fill-${COLOR}" %}{% endcapture %}
{{ octo | replace: "${COLOR}", color }}
{% octicon {{ name }} class="fill-{{ color }}" height:{{ height }} %}
{% octicon file-directory class:"fill-green" height:20 %}
This would be a good chance to write some more robust tests.