Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PromiseNetwork/github-actions-cache-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 GitHub Actions Cache Server

This is a drop-in replacement for the official GitHub hosted cache server. It is compatible with the official actions/cache action, so there is no need to change your workflow files and it even works with packages that internally use actions/cache.

Features

  • 🔥 Compatible with official actions/cache action
  • 📦 Supports multiple storage solutions and is easily extendable.
  • 🔒 Secure and self-hosted, giving you full control over your cache data.
  • 😎 Easy setup
services:
  cache-server:
    image: ghcr.io/falcondev-oss/github-actions-cache-server
    ports:
      - '3000:3000'
    environment:
      API_BASE_URL: http://localhost:3000
    volumes:
      - cache-data:/app/.data

volumes:
  cache-data:

Building and Publishing to Private Repository

Prerequisites

  • Docker installed and running
  • Access to your private container registry
  • Docker CLI authenticated with your private registry

Local Development Build

To build and run the application locally without Docker:

  1. Install dependencies:

    pnpm install
  2. Build the application:

    pnpm run build
  3. Run the application:

    pnpm run preview
  4. For development with hot reload:

    pnpm run dev

Docker Build and Push Steps

  1. Set your private repository environment variable:

    export CACHE_PRIVATE_REPO=your-private-registry.com/github-actions-cache-server
  2. Build the Docker image:

    docker build -t $CACHE_PRIVATE_REPO:latest .
  3. Tag for your private registry (if needed):

    docker tag $CACHE_PRIVATE_REPO:latest $CACHE_PRIVATE_REPO:v8.1.4
  4. Push to your private registry:

    docker push $CACHE_PRIVATE_REPO:latest
    docker push $CACHE_PRIVATE_REPO:v8.1.4

Using Your Private Image

Update your docker-compose.yml or deployment configuration to use your private image:

services:
  cache-server:
    image: ${CACHE_PRIVATE_REPO}:latest
    ports:
      - '3000:3000'
    environment:
      API_BASE_URL: http://localhost:3000
    volumes:
      - cache-data:/app/.data

volumes:
  cache-data:

Build Arguments

The Dockerfile supports a BUILD_HASH argument for tracking builds:

docker build --build-arg BUILD_HASH=$(git rev-parse HEAD) -t $CACHE_PRIVATE_REPO:latest .

Documentation

👉 https://gha-cache-server.falcondev.io/getting-started 👈

About

Self-hosted GitHub Actions cache server implementation. Compatible with official 'actions/cache' action

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • TypeScript 95.1%
  • Smarty 2.6%
  • JavaScript 1.5%
  • Other 0.8%