File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
.github/actions/universal-package Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ runs:
6060
6161 echo '::endgroup::'
6262
63- - name : Cache keg
64- id : cache-keg
65- uses : actions/cache@v4
63+ - name : Restore keg cache
64+ id : cache-keg-restore
65+ uses : actions/cache/restore @v4
6666 with :
6767 path : ${{ steps.setup-formula.outputs.brew_prefix }}/Cellar/${{ inputs.formula }}
6868 key : ${{ inputs.formula }}-homebrew-cache-custom-unified-prefix${{ steps.setup-formula.outputs.brew_prefix }}-xcode${{ steps.setup-formula.outputs.xcode_version }}-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
6969
7070 - name : Install formula
71+ id : install-formula
7172 shell : bash
7273 run : |
7374 echo '::group::Install formula'
@@ -100,3 +101,16 @@ runs:
100101 done
101102
102103 echo '::endgroup::'
104+
105+ - name : Save keg cache
106+ id : cache-keg-save
107+ uses : actions/cache/save@v4
108+ # We always save the generated artifact even if the whole run
109+ # fails due to other issues. This helps debugging build
110+ # failure issues faster if the cache doesn't already exist as
111+ # we want subsequent runs to not have to re-generate this
112+ # artifact again.
113+ if : always() && steps.cache-keg-restore.outputs.cache-hit != 'true' && steps.install-formula.conclusion == 'success'
114+ with :
115+ path : ${{ steps.setup-formula.outputs.brew_prefix }}/Cellar/${{ inputs.formula }}
116+ key : ${{ steps.cache-keg-restore.outputs.cache-primary-key }}
You can’t perform that action at this time.
0 commit comments