Overview
migetpacks integrates with GitHub Actions to build and push container images as part of your CI/CD pipeline. It works with both self-hosted runners (recommended for performance) and GitHub-hosted runners.Self-Hosted Runner
Self-hosted runners offer the best performance because Docker layer caches and package manager caches persist between builds.The persistent cache directory (
/home/runner/migetpacks-cache) survives runner restarts and dramatically speeds up dependency installation on subsequent builds.GitHub-Hosted Runner
GitHub-hosted runners do not persist Docker layer caches between runs. UseCACHE_IMAGE for registry-based caching to speed up builds.
Configuration Options
Registry Login
Always authenticate before running migetpacks if you are pushing to a private registry:Build Cache Directory
BUILD_CACHE_DIR enables shared package manager caching. On self-hosted runners, point this to a persistent directory:
Registry Mirror
REGISTRY_MIRROR configures a pull-through cache for Docker Hub images, reducing image pull times:
Custom Environment Variables
Pass build-time environment variables directly:Full Workflow Example
This complete workflow builds on push to main, tags with both commit SHA andlatest, and uses all available caching strategies:
Performance Tips
- Self-Hosted
- GitHub-Hosted
- Persistent cache: Use
BUILD_CACHE_DIRpointed at a local directory - Pre-pull images: Pull common base images during runner initialization
- Registry mirror: Use
REGISTRY_MIRRORfor Docker Hub images - Local Docker cache: Docker layer cache persists in
/var/lib/docker - NVMe storage: Use local SSD/NVMe for
/var/lib/dockerinstead of network storage