@@ -8,15 +8,15 @@ inputs:
88runs :
99 using : ' composite'
1010 steps :
11- - name : Cache Ruby
12- id : ruby-cache
13- uses : actions/cache@v4
11+ - name : Restore cached Ruby installation
12+ id : cache- ruby-restore
13+ uses : actions/cache/restore @v4
1414 with :
1515 path : ~/rubies/ruby-${{ inputs.version }}
1616 key : ruby-${{ inputs.version }}-openssl-1.1.1w
1717
1818 - name : Install Ruby
19- if : steps.ruby-cache .outputs.cache-hit != 'true'
19+ if : steps.cache- ruby-restore .outputs.cache-hit != 'true'
2020 shell : bash
2121 run : |
2222 latest_patch=$(curl -s https://cache.ruby-lang.org/pub/ruby/${{ inputs.version }}/ \
@@ -50,17 +50,34 @@ runs:
5050 ;;
5151 esac
5252
53+ - name : Save Ruby installation cache
54+ if : steps.cache-ruby-restore.outputs.cache-hit != 'true'
55+ id : cache-ruby-save
56+ uses : actions/cache/save@v4
57+ with :
58+ path : ~/rubies/ruby-${{ inputs.version }}
59+ key : ${{ steps.cache-ruby-restore.outputs.cache-primary-key }}
60+
5361 - name : Cache Bundler Install
54- id : bundler-cache
55- uses : actions/cache@v4
62+ id : cache- bundler-restore
63+ uses : actions/cache/restore @v4
5664 env :
5765 GEMFILE : ${{ env.BUNDLE_GEMFILE || 'Gemfile' }}
5866 with :
59- path : ./vendor/bundle
60- key : bundler-ruby-${{ inputs.version }}-${{ hashFiles(env.Gemfile, 'webauthn.gemspec') }}
67+ path : .. /vendor/bundle
68+ key : bundler-ruby-${{ inputs.version }}-openssl-1.1.1w- ${{ hashFiles(env.Gemfile, 'webauthn.gemspec') }}
6169
6270 - name : Install dependencies
71+ if : steps.cache-bundler-restore.outputs.cache-hit != 'true'
6372 shell : bash
6473 run : |
6574 bundle config set --local path ../vendor/bundle
6675 bundle install
76+
77+ - name : Save Bundler Install cache
78+ if : steps.cache-bundler-restore.outputs.cache-hit != 'true'
79+ id : cache-bundler-save
80+ uses : actions/cache/save@v4
81+ with :
82+ path : ../vendor/bundle
83+ key : ${{ steps.cache-bundler-restore.outputs.cache-primary-key }}
0 commit comments