We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65948b9 commit 6f2c609Copy full SHA for 6f2c609
1 file changed
.github/actions/restore-venv/action.yml
@@ -0,0 +1,30 @@
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
27
+ venv-directory:
28
29
+ precommit-home:
30
0 commit comments