GithubHelp home page GithubHelp logo

isabella232 / coursier-cache-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zendesk/coursier-cache-action

0.0 0.0 0.0 7.14 MB

GitHub action to save / restore the coursier cache of your build

License: MIT License

TypeScript 33.22% Scala 0.71% Shell 66.08%

coursier-cache-action's Introduction

coursier cache action

A GitHub action to save / restore the coursier / sbt / mill / Ammonite caches of your build.

Usage

Add a coursier/cache-action@v6 step to your YAML workflow, like

    steps:
      - uses: actions/checkout@v2
      - uses: coursier/cache-action@v6

Cached directories

Coursier cache

Always cached.

Add files to take into account in its cache key via extraFiles.

~/.sbt

Cached when sbt files are found (any of *.sbt, project/**.scala, project/**.sbt, project/build.properties).

Add files to take into account in its cache key via extraSbtFiles.

~/.mill

Cached when mill files are found (any of .mill-version, ./mill).

Add files to take into account in its cache key via extraMillFiles.

~/.ammonite

Cached when Ammonite scripts are found (any of *.sc, */*.sc).

Add files to take into account in its cache key via ammoniteScripts.

Parameters

root

Optional Root directory containing build definition sources (build.sbt, build.sc, etc.)

If the sbt or mill build definition files are in a sub-directory, pass the path to this sub-directory here.

path

Optional Override for the path of the coursier cache.

By default, the coursier cache is assumed to be in the default OS-dependent location. Set this input to override that. Note that this action will also set the COURSIER_CACHE environment variable if an override is specified, so that you don't have to set it yourself.

extraFiles

Optional Extra files to take into account in the cache key.

By default, sbt build definition files (*.sbt, project/**.{scala,sbt}, project/build.properties) and mill build definition files (*.sc, ./mill) are hashed to uniquely identify the cached data. Upon cache restoration, if an exact match is found, the cache is not saved again at the end of the job. In case of no exact match, it is assumed new files may have been fetched; the previous cache for the current OS, if any, is restored, but a new cache is persisted with a new key at the end of the job.

To take into account extra files in the cache key, pass via extraFiles either

  • a single path as a string
  • multiple paths in a JSON array, encoded in a string

Blobs are accepted (processed by glob-all).

extraSbtFiles

Optional Extra sbt files to take into account in the sbt cache key. Same format as extraFiles.

extraMillFiles

Optional Extra mill files to take into account in the mill cache key. Same format as extraFiles.

ammoniteScripts

Optional Extra Ammonite scripts to take into account in the Ammonite cache key. Same format as extraFiles.

extraKey

Optional

Extra value to be appended to the coursier cache key.

See extraFiles for more details.

extraHashedContent

Optional

Extra content to take into account in the cache key.

See extraFiles for more details.

The content of extraHashedContent is taken into account in the hash for the coursier cache key.

coursier-cache-action's People

Contributors

akiomik avatar alexarchambault avatar dependabot[bot] avatar exoego avatar github-actions[bot] avatar gvolpe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.