From b1acbc75716e831f4d5157c7a6d626f687db7a8e Mon Sep 17 00:00:00 2001 From: EIzharikov <90442695+EIzharikov@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:48:25 +0300 Subject: [PATCH] [CACHE] Time-to-live and better cache key (#1) --- action.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index c111ee1..6373e49 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,5 @@ name: 'Setup environment' description: 'Setup environment for HSE FIPL courses' - runs: using: "composite" steps: @@ -8,8 +7,17 @@ runs: uses: actions/setup-python@v4 with: python-version: '3.10' - cache: 'pipenv' + - name: Cache pip + uses: actions/cache@v3 + id: cache + with: + path: | + ./venv/ + ~/.local/bin/mystem + key: ${{ env.GITHUB_REPOSITORY }}-${{ env.BRANCH_NAME }}-pip-${{ hashFiles('**/requirements*.txt') }} + ttl: 1814400 - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' shell: bash run: | bash config/venv_setup.sh