GitHub Actions Cache and Persistent Storage
Puzl Cloud provides two ways to persist data across your GitHub Actions runs:
- Actions Cache configuring via the puzl-cloud-cache action.
- Shared persistent mount points configuring in your runner settings.
Both live on the same underlying Flexible Persistent File Storage and shared among the workflow jobs within the same GitHubActionsIntegration, but differ in usage patterns and safety characteristics.
1. GitHub Actions Cache
Use cache for typical dependency or build caches, especially on public repos.
- Isolation: Each workflow run gets its cache scope by repo and branch, or by pull request, following the safety official GitHub practices.
- Security: 100% safe for public repositories - external PRs cannot mutate cache on your branches.
- Speed: Artifacts in
/cache
are tar-packed on save and unpacked on restore. - Data rotation: Caches expire after 30 days by default; configurable in your GitHubActionsIntegration settings.
Using Puzl Cache Action in Your Workflow
name: Caching Primes
on: push
jobs:
build:
runs-on: puzl-ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Primes
id: cache-primes
uses: puzl-cloud/github-actions-cache@v3
with:
path: prime-numbers
key: primes
- name: Generate Prime Numbers
if: steps.cache-primes.outputs.cache-hit != 'true'
run: /generate-primes.sh -d prime-numbers
- name: Use Prime Numbers
run: /primes.sh -d prime-numbers
For the latest documentation and details, see Puzl’s GitHub Actions cache on the Marketplace.
2. Shared Persistent Mount Points
Use shared mounts when you need faster I/O, or to share large datasets/images/tool caches among your workflow jobs.
- Isolation: Multiple workflow jobs, running in the same GitHubActionsIntegration, may mount the same paths to collaborate.
- Security: Because mount points expose raw file access to all workflow runs, do not use them to run the public workflows.
- Speed: Data lives on a mounted filesystem - no packing/unpacking overhead.
- Data rotation: No automatic cleanup; data persists until you or your workflows delete it manually.
When running workflows from a public GitHub repository, use a dedicated runner and avoid sharedPersistentMountPoints to prevent public pull requests from mutating your shared data.
Setting Up Mount Points for Your Runner
- Cloud Console
- kubectl
- Navigate to the GitHub Runners section in the Puzl Cloud Console.
- Find the necessary runner and go to Runner Settings.
- Enter the required destinations in Shared Persistent Mount Points input.
Add the required directories under your runner’s settings in the GitHubRunnerClaim resource.
spec:
jobs:
sharedPersistentMountPoints:
- /mnt/my-shared-data
- /home/user/my-folder