Repository navigation
Releases
v2.0.1
A maintenance release with no change in behaviour: @v2 runs exactly as in v2.0.0, so there is nothing to update in your workflows.
- Listed on the GitHub Marketplace. The action's description is shorter, to fit the Marketplace's 125-character limit (#12).
- CI: runs for version tags now find the caches that run saved, so the release's own cache check works on tags too (#9). This only affects this repository's CI, not callers.
New in v2, if you are coming from v1
v2 is a Node.js action that saves the package cache itself at the end of the job (#1), so using it takes one step:
- uses: zyga/setup-pkgproxy@v2
id: pkgproxyUpgrading (details in the README's "Upgrading from v1"):
- Delete your "Prepare pkgproxy cache for saving" and
actions/cache/savesteps. A post step stops pkgproxy and saves the cache, whether the job passed, failed or was cancelled. - Only the default branch saves the cache, by default (
save-package-cache: default-branch | always | never). Pull requests and other branches restore the default branch's cache but never save their own. If your workflow runs only onpull_request, add apushtrigger for the default branch, or nothing is ever saved. - Outputs:
package-cache-hit,package-cache-key-successandpackage-cache-key-partialare replaced bypackage-cache-restored-keyandpackage-cache-key.
Better caching:
- Rolling keys: each job that adds to the cache saves it under a new key and the next job restores the newest, so the cache keeps up with what your jobs download.
- No needless uploads: a job that added nothing saves nothing.
- xattrs preserved, in the same
pkgproxy-cache-v4format as v1.2.0, so a v1.2 cache warms v2. Caches from v1.0 and v1.1 start cold once. - Job summary showing what was restored, how the cache grew, whether it was saved and why, and
pkgproxyctl stats.
Also: pkgproxy v0.11.0; Go from the runner's tool cache, or from go.dev checked against its SHA-256; the built binary is cached outside your checkout.
See the v2.0.0 release for the full notes.
Full Changelog: v2.0.0...v2.0.1
v2.0.0
setup-pkgproxy is now a Node.js action that saves the package cache itself at the end of the job (#1). Using it takes one step:
on:
push:
branches: [main] # only the default branch saves the cache, see below
pull_request:
# ...
- uses: zyga/setup-pkgproxy@v2
id: pkgproxyUpgrading from v1 (details in the README's "Upgrading from v1"):
- Delete your "Prepare pkgproxy cache for saving" and
actions/cache/savesteps. A post step stops pkgproxy and saves the cache, whether the job passed, failed or was cancelled. - Only the default branch saves the cache, by default (
save-package-cache: default-branch | always | never). Pull requests and other branches restore the default branch's cache, but never save their own: a PR's copy would only help that PR, while taking room (several hundred MB per snap build) that would evict the default branch's. If your workflow runs only onpull_request, add apushtrigger for the default branch, or nothing is ever saved. - Outputs:
package-cache-hit,package-cache-key-successandpackage-cache-key-partialare replaced bypackage-cache-restored-keyandpackage-cache-key.
How the cache is kept:
- Rolling keys: each job that adds to the cache saves it under a key of its own, and the next job restores the newest one, so the cache keeps up with what your jobs download instead of freezing at its first save.
- No needless uploads: a job that added nothing saves nothing.
- xattrs preserved: the cache is saved as an archive made with
tar --xattrs, ready for pkgproxy 0.12, underpkgproxy-cache-v4, the same format and prefix as v1.2.0. A v1.2 cache warms v2, but caches from v1.0 and v1.1 start cold once. - Job summary: shows what was restored, how the cache grew, whether it was saved and why, and
pkgproxyctl stats.
Also:
- pkgproxy v0.11.0.
- Go: taken from the runner's tool cache, or downloaded from go.dev and checked against its SHA-256.
- Clean checkout: the built binary is cached outside your checkout.
v1 stays maintained on releases/v1 (v1.2.0 is out alongside this release).
v1.2.0
Bump pkgproxy from v0.8.0 to v0.11.0, and save the package cache in a form pkgproxy 0.12 will need.
- pkgproxy 0.9–0.11: LXD 6.10+ image registries for
setup lxd-remote, offline modes (pkgproxyctl offline, and going offline with the machine's network),setup rockcraft/setup charmcraft, andsetup status. Setup scripts now fail when they can't set up their tool, instead of silently doing nothing. - The package cache is saved as an archive that keeps extended attributes. pkgproxy 0.12 will store each cached file's metadata in an xattr, and the
tarinsideactions/cachedrops xattrs. When pkgproxy stops, its unit now writes/var/cache/pkgproxy-archive/cache.tarwithtar --xattrs, and thecache-diroutput points at that directory. Your save steps don't change, as long as they stop pkgproxy before saving, as the README has always shown. package-cache-keydefault is nowpkgproxy-cache-v4: it's a new cache format, so the first run after upgrading starts cold on each CPU arch.- README:
- how to give the runner user LXD access on GitHub-hosted runners (
usermodplussg lxd); - the snapcraft hook check updated for pkgproxy 0.11's inline hooks;
- the manual snapcraft project pre-creation step removed, because
setup snapcraftnow creates the project.
- how to give the runner user LXD access on GitHub-hosted runners (
- CI builds a real snap through pkgproxy on ubuntu-22.04, 24.04 and 24.04-arm, and checks that the saved cache comes back with its xattrs.
v2.0.0 is out alongside this release: it saves the cache itself at the end of the job. See its notes for how to upgrade.
v1.1.0
Bump pkgproxy from v0.6.1 to v0.8.0.
- Docker Hub registry mirror (opt-in client:
pkgproxyctl setup docker, documented in the README). - Upstream fixes: upstream idle timeouts, streamed snap/LXD downloads, stale metadata served while a mirror is down.
package-cache-keydefault is nowpkgproxy-cache-v3: pkgproxy 0.7.0 changed apt cache keys, so the old cache is not reusable and starts fresh once.
v1.0.4
Docs and Marketplace-listing polish, no behavior changes to the action itself.
- Shortened the action description to fit GitHub Marketplace's 125-character limit (was ~370 chars).
- Added Marketplace branding:
packageicon, purple. - README: documented the cache-save pattern every caller actually needs (stop
pkgproxy.serviceand chown the cache dir back to the runner user beforeactions/cache/save, since the daemon runs as root) — the previous example omitted this and would fail if followed literally. - README: added a full "Setting up each proxy client" section covering
apt,snap,go,lxd,lxd-remote, andsnapcraft, sourced from pkgproxy's owncmd_setup_*.godoc comments. Calls out thatsnapcraftneeds extra prep (pre-creating the LXD project/profile beforesetup snapcrafthas anything to patch, and verifying the pre-start hook beforesnapcraft packruns) that the other targets don't.