Skip to content

Commit

Permalink
ci: Don't use random, use run_id and run_attempt.
Browse files Browse the repository at this point in the history
RANDOM wasn't working.
  • Loading branch information
eyal0 committed Sep 10, 2022
1 parent 368f098 commit 6aeca43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,11 @@ jobs:
else
echo "::set-output name=path::${{ matrix.local_install_path }}"
fi
- name: Get a random number
run: echo "export RANDOM_SUFFIX='${RANDOM}${RANDOM}'" >> ~/.bash_profile
- name: Cache local install path
uses: eyal0/cache@main
with:
path: ${{ steps.sanitize-key.outputs.path }}
key: ${{ steps.sanitize-key.outputs.key }}-${{ env.RANDOM_SUFFIX }}
key: ${{ steps.sanitize-key.outputs.key }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
${{ steps.sanitize-key.outputs.key }}-
update-env-variable: "UPDATE_CACHE"
Expand Down

0 comments on commit 6aeca43

Please sign in to comment.