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 28, 2024
1 parent ce49774 commit 01e4432
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Release History
- Added ``gpl-v2`` license type. (`#192`_)
- Added ``isort_exclude`` option to the ``pyproject_toml`` config, which
can be used by ``isort`` to skip files or directories via regex patterns. (`#196`_)
- Added ``cache=False`` option to ``setup`` action. (`#198`_)

**Changed**

Expand Down Expand Up @@ -70,6 +71,7 @@ Release History
.. _#191: https://github.com/nengo/nengo-bones/pull/191
.. _#192: https://github.com/nengo/nengo-bones/pull/192
.. _#196: https://github.com/nengo/nengo-bones/pull/196
.. _#198: https://github.com/nengo/nengo-bones/pull/198

22.11.15 (November 15, 2022)
============================
Expand Down
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 01e4432

Please sign in to comment.