GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feat: Control whether caches are written · Issue #1570 · actions/cache

Feat: Control whether caches are written #1570

New issue
Copy link
New issue
Copy link
Open
Open
Feat: Control whether caches are written#1570
Copy link

Description

@helly25
helly25
opened on Mar 11, 2025
Issue body actions

In some cases you want to read but not save a new cache. For instance when you run workflows on a tag action, then you probably want to read caches from the main/default branch, but you most likely do not want to create new caches. The current solution is to separate restore and save actions which is cumbersome.

In #1452 the always_save feature was removed.

I propose to add a new config save-on-success that defaults to true and can be set false to prevent cache writing. Now this new value can be set from available context - just like you could when separating the steps - granted the decision must be available upfront. That above described decision is in fact available immediately on job creation. So we can use the new setting to simplify the setup.

Reacted by Niklas Werner, Eir Nym, Andreas Möller and Ian Wahbe
Reacted by Neil Aitken, Eir Nym, Kyle Ross and Shawn Garner
Reacted by Eir Nym

Activity

  1. helly25
    added a commit that references this issue on Mar 11, 2025

    Add new setting save-on-success.

    b38d23e
  2. helly25 commented on Mar 11, 2025

    @helly25
    helly25
    on Mar 11, 2025
    Author
    More actions

    A proposal to implement this is in #1571

    Reacted by Eir Nym and Shawn Garner
    Reacted by Kyle Ross
  3. helly25
    added a commit that references this issue on Apr 25, 2025

    Add new setting save-on-success.

    40b3745
  4. helly25 commented on Apr 25, 2025

    @helly25
    helly25
    on Apr 25, 2025
    Author
    More actions

    See also https://github.com/actions/cache/discussions/1598

    Reacted by Eir Nym
  5. iwahbe commented on Jul 16, 2025

    @iwahbe
    iwahbe
    on Jul 16, 2025
    More actions

    This would be very helpful to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.