Add cache-write input for read-only cache mode by salmanmkc · Pull Request #1284 · actions/setup-python

@salmanmkc

Add a 'cache-write' input (default: true) that controls whether the cache
is saved at the end of the workflow. When set to 'false', the action will
restore cached dependencies but skip saving, providing a read-only cache
mode.

This is useful for preventing cache poisoning attacks from untrusted PR
builds while still benefiting from cached dependencies.

Copilot AI review requested due to automatic review settings

March 9, 2026 12:50

@salmanmkc