Access to Home environment variable from evaluation context (to set a cache path)

I’m trying to access the HOME environment variable when setting a cache.

-name:"Cache ruby"  
uses: actions/cache@preview
id: cache-ruby
with:
path: ${{ env.HOME }}/.rvm
key: ${{ runner.os }}-ruby-${{ env.RUBY_VERSION }}
restore-keys: |
${{ runner.os }}-ruby-

in this case the path should be 

/home/runner/.rvm

Is there any way to access it ?

I think “env” context keeps only stuff which was added via env map or ::set-env “command”, ignoring standard variables. If that’s correct, i’d try something like this…

- run: echo ::set-env name=HOME::$HOME
  shell: bash

…to push variable into “env” context, so it can be used with your step.

But hey, as it’s about cache action, can’t you use “~” instead? Lot of examples uses that instead of $HOME