Skip to content

Commit

Permalink
ci: move new elixir cache to new action
Browse files Browse the repository at this point in the history
  • Loading branch information
metaclips committed Oct 17, 2023
1 parent bfeb882 commit 6eed4cb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/actions/cache_elixir/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Elixir Cache
description: Elixir Cache


inputs:
job_name:
description: Extra key to use for restoring and saving the cache
Expand All @@ -9,11 +10,22 @@ inputs:
runs:
using: composite
steps:
- uses: actions/cache@67b839edb68371cc5014f6cea11c9aa77238de78
- name: Restore and save cache
if: ${{ github.event_name == 'schedule' }}
uses: actions/cache@67b839edb68371cc5014f6cea11c9aa77238de78
with:
path: |
**/deps
**/_build
key: cache-elixir-${{ github.workflow }}-${{ github.job }}-${{ inputs.job_name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: cache-elixir-${{ github.workflow }}-${{ github.job }}-${{ inputs.job_name }}-

- name: Restore Cache
if: ${{ github.event_name != 'schedule' }}
uses: actions/cache/restore@67b839edb68371cc5014f6cea11c9aa77238de78
with:
path: |
**/deps
**/_build
key: cache-elixir-${{ github.workflow }}-${{ github.job }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
cache-elixir-${{ github.workflow }}-${{ github.job }}-
key: cache-elixir-${{ github.workflow }}-${{ github.job }}-${{ inputs.job_name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: cache-elixir-${{ github.workflow }}-${{ github.job }}-${{ inputs.job_name }}-

0 comments on commit 6eed4cb

Please sign in to comment.