Repository navigation
Conversation
The runner only exports ACTIONS_CACHE_MODE from NodeScriptActionHandler and ContainerActionHandler, so shell scripts in run steps can't read the effective cache mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
🔵 Needs a closer look
SME confirmation is needed because the note describes runner behavior absent from this checkout and spanning supported product versions, specifically the JavaScript/container versus run-step distinction.
No open issues 🎉
What changed in this PR
Clarifies the scope of the ACTIONS_CACHE_MODE environment variable in the dependency caching reference, explaining that it is unavailable to shell-based run steps.
Changes:
- Notes that the variable is set only for JavaScript and Docker container actions.
- Clarifies that
runsteps, including those in composite actions, cannot access it.
| File | Description |
|---|---|
| content/actions/reference/workflows-and-actions/dependency-caching.md | Documents that ACTIONS_CACHE_MODE is available only to JavaScript and Docker container actions, not to run steps. |
Review effort: Lite
The check in 'make requirements-lock' always failed in CI. The runner only sets ACTIONS_CACHE_MODE for JavaScript and container actions, not for run: steps, so the Makefile saw it as unset even with workflow-level cache-mode: read. The cache-mode: read setting in update-python-requirements.yml is unchanged and still limits the job's cache token. Docs clarification proposed upstream: github/docs#46906 Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Why:
Closes: N/A
The "Controlling cache access with
cache-mode" section says "The runner exposes the effective mode in theACTIONS_CACHE_MODEenvironment variable". It's natural to read that as meaning every step can see the variable. But a shell script in arunstep sees nothing, even when the job setup log showsCache mode: read. That makes it look like the feature is broken or not rolled out yet.In actions/runner, only
NodeScriptActionHandlerandContainerActionHandlersetACTIONS_CACHE_MODEin the step environment.JobExtensionjust logs the mode. The handler forrunsteps never sets it.What's being changed (if available, include any code snippets, screenshots, or gifs):
Adds a short note to
content/actions/reference/workflows-and-actions/dependency-caching.md, right after the paragraph aboutACTIONS_CACHE_MODE:Note
ACTIONS_CACHE_MODEis only set in the environment of JavaScript and Docker container actions. It is not available torunsteps, includingrunsteps in composite actions.Check off the following:
🤖 Generated with Claude Code