-
Notifications
You must be signed in to change notification settings - Fork 12
Description
ultimate-elixir-ci/.github/actions/elixir-setup/action.yml
Lines 83 to 90 in ecdeb17
| - name: Get Hex cache | |
| uses: actions/cache@v2 | |
| id: hex-cache | |
| with: | |
| path: ~/.hex | |
| key: build-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| build-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}- |
We've been using this setup in our CI for the past few months with great results, but last week I needed to manually expire the hex cache and got massively confused by this cache key.
Is this a typo? Should the prefix be hex-? And shouldn't it include the inputs.cache-key so it can be expired with the rest?
As it is now, both the _build/ and .hex caches use the build- prefix for the cache key, the only difference between them being the presence of inputs.cache-key. This makes it hard to differentiate the caches in the github actions ui and impossible to manually expire the hex cache (by changing the value of inputs.cache-key that is).
Would it be better to update the hex key to something like
key: hex-${{ inputs.cache-key }}-${{ runner.os }}-${{ inputs.otp-version }}-${{ inputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}Thanks for the help!