1 Commits

Author SHA1 Message Date
root 9bdbcd4d88 workflows: disable docker-clean so apt cache survives between runs
Build / test (push) Successful in 1m13s
Build / build-windows (push) Successful in 56s
Release / release (push) Successful in 3m15s
Debian-based Docker images install /etc/apt/apt.conf.d/docker-clean
which runs 'apt-get clean' after every apt-get install — wipes out
/var/cache/apt/archives so there's nothing for actions/cache to save.

Fix: remove the docker-clean drop-in and add keep-cache config first
thing in each job, before any apt activity. Also bump apt cache key
to v2 since the previous v1 was always empty.

Wait time on the Wine + Inno Setup step should drop from ~1m20s to
~10s on warm runs (debs already in /var/cache/apt/archives, dpkg
just installs them locally).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 03:16:09 +03:00
2 changed files with 21 additions and 1 deletions
+10
View File
@@ -25,6 +25,11 @@ jobs:
test:
runs-on: go
steps:
- name: Disable apt auto-clean (preserve cache for actions/cache)
run: |
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
- name: Install Node (required by actions/cache)
run: |
apt-get update >/dev/null
@@ -61,6 +66,11 @@ jobs:
runs-on: go
needs: test
steps:
- name: Disable apt auto-clean (preserve cache for actions/cache)
run: |
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
- name: Install Node (required by actions/cache)
run: |
apt-get update >/dev/null
+11 -1
View File
@@ -16,6 +16,15 @@ jobs:
release:
runs-on: go
steps:
# Debian-based Docker images ship /etc/apt/apt.conf.d/docker-clean
# which deletes /var/cache/apt/archives after every apt-get install.
# That defeats actions/cache for the apt cache; disable it before
# any apt operations.
- name: Disable apt auto-clean (preserve cache for actions/cache)
run: |
rm -f /etc/apt/apt.conf.d/docker-clean
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
- name: Install Node (required by actions/cache)
run: |
apt-get update >/dev/null
@@ -42,12 +51,13 @@ jobs:
# Cache apt downloads — saves ~50s on the wine + innoextract install.
# Bump the cache key (-v2, -v3, ...) when the package list changes.
- name: Cache apt packages
id: apt-cache
uses: actions/cache@v4
with:
path: |
/var/cache/apt/archives
/var/lib/apt/lists
key: apt-trixie-wine-innoextract-v1
key: apt-trixie-wine-innoextract-v2
- name: Extract version from tag
id: version