Ruby Gems are installed into a single directory by default. You can get the location of this directory with gem environment gemdir. If you want to change this directory you can set the $GEM_HOME
environment variable, this will be picked up by gem install and it’ll install the Gems to the location specified by $GEM_HOME
.
- Open your app’s
Workflow Editor
. - Add a
Script
step to your workflow. -
Set the
$GEM_HOME
environment variable in theScript
step.- script: title: Set GEM_HOME env var inputs: - content: |- #!/bin/bash set -ev envman add --key GEM_HOME --value "$(gem environment gemdir)"
-
Insert the
Cache:Pull
step after theGit Clone
but before theAndroid Build
steps.IMPORTANT: Make sure that your step is version 1.0.0 or newer.
- Insert the
Cache:Push
step to the very end of your workflow.
And you’re done!