Skip to content

Commit

Permalink
Add cache option to setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
drasmuss committed Feb 26, 2024
1 parent ce49774 commit 33cf1fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: Python version (passed to actions/setup-python)
required: false
default: "3"
cache:
description: Enable/disable caching of pip/conda downloads
required: false
default: "true"
runs:
using: composite
steps:
Expand All @@ -19,9 +23,10 @@ runs:
with:
create-args: python=${{ inputs.python-version }}
environment-name: ci
cache-downloads: true
cache-downloads: ${{ inputs.cache }}
generate-run-shell: false
- uses: actions/cache@v4
if: ${{ inputs.cache == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip

0 comments on commit 33cf1fc

Please sign in to comment.