Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid sbt cache being invalidated for a library that is only incrementing its own version #564

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Dec 7, 2023

  1. Avoid sbt cache being invalidated for a library that is only incremen…

    …ting it's own version
    
    While working on https://github.com/guardian/gha-scala-library-release-workflow I noticed that no matter how many times I ran the workflow, `actions/setup-java` would always report `sbt cache is not found`, even if there had been no substantial change in the project - simply that `version.sbt` (the file used by https://github.com/sbt/sbt-release) had the version number in it incremented (as in guardian/play-secret-rotation@b215232).
    
    This meant that turning on `cache: sbt` would actually slow the workflow considerably, as it would never benefit from the cache being present, and would always have to save it, which could take 2-3 minutes - even though it can't take advantage of the data it's saving.
    
    As such, it would be great to exclude `version.sbt` files from the cache hash key.
    
    Background: `cache: sbt` was orginally introduced with actions#302
    rtyley committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    f228ab5 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Configuration menu
    Copy the full SHA
    ed3ab60 View commit details
    Browse the repository at this point in the history