wtfiscrq / github-cache-server

A local implementation of a rudimentary GitHub Actions Caching server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github Cache Server

... a working Github Actions actions/cache compatible emulation solution with out-of-the-box on-disk persistance and minimum authorization security support.

This work is inspired from anthonykawa/artifact-server's excellent reverse engineering efforts applied now for caching instead.

Running it

$ npm i
$ AUTH_KEY=github-local-cache npm start

This will start the server itself and await cache requests.

Then you'll need to point your act runner to something like this:

$ act \
  -e ACTIONS_CACHE_URL=http://host.docker.internal:8080/
  -e ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/
  -e ACTIONS_RUNTIME_TOKEN=github-local-cache
  ...

or, better yet, just make a .actrc file with:

--env ACTIONS_CACHE_URL=http://host.docker.internal:8080/
--env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/
--env ACTIONS_RUNTIME_TOKEN=github-local-cache

P.S: Don't forget to wire-up your actions/cache with the chosen token. Whatever that might be.

About

A local implementation of a rudimentary GitHub Actions Caching server


Languages

Language:JavaScript 95.2%Language:Dockerfile 4.8%