GithubHelp home page GithubHelp logo

gwatts / github-act-cache-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mottet/github-act-cache-server

0.0 0.0 0.0 1.25 MB

Github artifact cache server to be used locally

JavaScript 98.04% Dockerfile 1.96%

github-act-cache-server's Introduction

github-act-cache-server

Spin up a local Github artifact cache server to be used with act Github actions that uses actions/cache

Run

ACT_CACHE_AUTH_KEY=foo docker-compose up --build

Act config

Ensure you add the following configuration to your ~/.actrc file:

--env ACTIONS_CACHE_URL=http://localhost:8080/
--env ACTIONS_RUNTIME_URL=http://localhost:8080/
--env ACTIONS_RUNTIME_TOKEN=foo

Observations

  • You can set ACT_CACHE_AUTH_KEY and ACTIONS_RUNTIME_TOKEN to the value you want, but they must be the same
  • The cache is persisted in Docker's named volumes(when using docker-compose) so it will survive between containers
  • To purge the cache use the endpoint /_apis/artifactcache/clean. ie
curl -X POST -H 'Authorization: Bearer foo' 'http://localhost:8080/_apis/artifactcache/clean'

Caveats

  • The caching is global, meaning that it's shared across git projects and branches. As the container lacks the information of the Github context the action is running on it does not have access to GITHUB_REPOSITORY, GITHUB_REF or GITHUB_BASE_REF so it can do a better job restoring fallback caches or switching branches

Acknowledgments

github-act-cache-server's People

Contributors

anthonykawa avatar chevdor avatar davetapley avatar mottet avatar sp-ricard-valverde 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.