Skip to content

Commit

Permalink
ci: Fix cache saving using restore-key
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Mar 25, 2021
1 parent aace650 commit 57990b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,18 @@ jobs:
else
echo "::set-output name=path::${{ matrix.local_install_path }}"
fi
- name: Get a random number
run: echo "RANDOM_SUFFIX=${RANDOM}${RANDOM}" >> $GITHUB_ENV
- name: Cache local install path
uses: eyal0/cache@main
with:
path: ${{ steps.sanitize-key.outputs.path }}
key: ${{ steps.sanitize-key.outputs.key }}
key: ${{ steps.sanitize-key.outputs.key }}-${{ env.RANDOM_SUFFIX }}
restore-keys: |
${{ steps.sanitize-key.outputs.key }}-
update-env-variable: "UPDATE_CACHE"
- name: Default don't update cache
run: echo "UPDATE_CACHE=false" >> $GITHUB_ENV
- name: Build and install boost
if: matrix.os == 'ubuntu'
env:
Expand Down

0 comments on commit 57990b6

Please sign in to comment.