This guide describes how to integrate your GitHub Action workflows with Ubicloud Cache.Ubicloud starts a clean and ephemeral VM for each new workflow job for security purposes. Fresh VMs need to download job dependencies, leading to increased network usage, longer runtimes, and higher costs. GitHub Actions cache allows to share dependencies and other commonly reused files between workflow jobs.Ubicloud Cache improves on the GitHub Actions cache by storing cached files closer to Ubicloud runners, making cache downloading/uploading more reliable and up to 4x faster.Ubicloud Cache offers 30 GB of free storage per repository, at 3x of GitHub’s default cache size. If you have premium runners enabled, that rises to 100 GB per repository across every repository in your account. The limit applies per repository, not per runner, and premium runners and the standard runners that jobs fall back to share the same allowance.If you exceed the limit, the oldest caches are automatically deleted to make space for new ones. Additionally, caches that haven’t been accessed in the past seven days are automatically removed.
Need more than your allowance? We offer additional cache storage in 25 GB increments at 0.04perGBpermonth,whichworksoutat1.00 per 25 GB per month. Email us at support@ubicloud.com and we’ll set it up.
It is the recommended way to use Ubicloud’s cache infrastructure. Transparent cache gives you immense flexibility when using Ubicloud’s runners, allowing you to switch between Ubicloud’s runners and GitHub’s default runners without modifying your workflow files.
Transparent cache is enabled by default. If you need to disable it, you can do so in the Ubicloud console.
Transparent cache supports all actions caching files, including:
File/Folder Caching with actions/cache: Cache specific files or directories like dependencies or build outputs to speed up workflows.
Package Manager Caching with actions/setup-*: Automatically caches dependencies for languages such as Python (actions/setup-python), Node.js (actions/setup-node), and Go (actions/setup-go). 3rd party actions are also supported for some languages like Rust (Swatinem/rust-cache).
Docker Layer Caching with docker/build-push-action: Speeds up container builds by caching unchanged layers using type=gha:
Transparent cache improves download performance by 4x and upload performance by 3x on Ubicloud runners, with ongoing efforts to enhance upload speeds even further.For a deep dive into its implementation and detailed performance metrics, check out the GitHub Actions Transparent Cache Blog Post.
By default, workflow runs can only access caches created on the current branch/tag or the default branch. This is consistent with GitHub’s default cache isolation behavior.You can disable cache branch protection in the Ubicloud console under your GitHub installation settings to share caches across all branches.
Disabling cache branch protection on public repositories should be done with caution. If not all contributors are trusted, sharing caches across branches may lead to cross-branch cache poisoning attacks.
Assistant
Responses are generated using AI and may contain mistakes.