File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
.github/actions/restore-venv Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Restore venv and pre-commit from cache"
2+ description : " Restores the venv and pre-commit cache or fails"
3+
4+ runs :
5+ using : " composite"
6+ steps :
7+ - name : Create or reuse cache
8+ id : cache-create
9+ uses : actions/cache@v4
10+ with :
11+ path : |
12+ ${{ inputs.venv-directory }}
13+ ${{ inputs.precommit-home }}
14+ key : ${{ inputs.cache-key }}
15+ - name : Fail job if Python cache restore failed
16+ if : steps.cache-create.outputs.cache-hit != 'true'
17+ shell : bash
18+ run : |
19+ echo "Failed to restore cache for {{ inputs.python-version}} virtual environment from cache"
20+ exit 1
21+
22+ inputs :
23+ python-version :
24+ required : true
25+ cache-key :
26+ required : true
27+ venv-directory :
28+ required : true
29+ precommit-home :
30+ required : true
You can’t perform that action at this time.
0 commit comments