Giter Club home page Giter Club logo

Comments (3)

elijahr avatar elijahr commented on May 28, 2024 5

I think you could use actions/cache and mount the restored cache in a volume:

- name: Restore cache
  uses: actions/cache@v2
  with:
    path: |
      build-cache
    key: some-key

- uses: uraimo/[email protected]
  name: Build

  ...

  # Create a build-cache directory
  setup: |
    mkdir -p "${PWD}/build-cache"

  # Mount the build-cache directory as /build-cache in the container
  dockerRunArgs: |
    --volume "${PWD}/build-cache:/build-cache"

  ...

from run-on-arch-action.

uraimo avatar uraimo commented on May 28, 2024

Hi, you could cache "something", leveraging the install option:

install: Shell commands to execute in the container as part of docker build, such as installing dependencies. This speeds up subsequent builds if githubToken is also used, but note that the image layer will be publicly available in your projects GitHub Package Registry, so make sure the resulting image does not have any secrets cached in logs or state.

But I'm not really sure if that's the better option in your case (would require a double build, the first one in "install" to build the initial cache) but can't think of any easy alternative right now.

from run-on-arch-action.

patrickelectric avatar patrickelectric commented on May 28, 2024

Great idea, that's what I'm looking for, thanks @elijahr !

from run-on-arch-action.

Related Issues (20)

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.