Skip to content
Latchkey

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

  1. Append key=value to \${GITHUB_STATE} in the main step.
  2. Read it from the STATE_<key> env var in the post step.
  3. 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →