Conditionally Naming Cache Keys



I’m building up a workflow to run some builds as tags get pushed.

I’ve read through the documentation, and was disappointed to learn that there is no template such as:
{{ .Tag }} that acts in a similar vein to {{ .Branch }}

Which got me wondering: is it possible to conditionally name the cache that I want to save using environment variables?
This would save me having to have a second checkout job specifically for tag workflows.