GitHub Actions save-state deprecated (use GITHUB_STATE)
Like set-output, the ::save-state:: workflow command was deprecated and disabled. Actions must write key=value lines to the file at \${GITHUB_STATE} to pass state from a main to a post step.
What this error means
A post step does not receive state, and logs warn that save-state is deprecated and disabled.
github-actions
Error: Unable to process command '::save-state name=cacheKey::abc' successfully.
The `save-state` command is deprecated and disabled.Common causes
Using ::save-state::
The command form was removed; state is not persisted to the post step.
Outdated action dependency
A third-party action still emitting the old command needs an upgrade.
How to fix it
Write to the GITHUB_STATE file
- Append key=value to \${GITHUB_STATE} in the main step.
- Read it from the STATE_<key> env var in the post step.
- Update third-party actions that still use save-state.
action runtime
# main step (composite or JS action)
echo "cacheKey=abc" >> "${GITHUB_STATE}"How to prevent it
- Replace ::save-state:: with GITHUB_STATE file writes.
- Pin and update actions so they use file-based commands.
Related guides
GitHub Actions GITHUB_OUTPUT not set / set-output deprecatedFix GitHub Actions step outputs after set-output was removed - write to the GITHUB_OUTPUT file instead of the…
GitHub Actions multiline GITHUB_OUTPUT broken without heredocFix a GitHub Actions multiline step output that is truncated - multiline GITHUB_OUTPUT values need a heredoc…
GitHub Actions heredoc to GITHUB_ENV multiline failedFix a GitHub Actions multiline value written to GITHUB_ENV - a missing or value-colliding heredoc delimiter b…