Skip to content

Commit 457d2db

Browse files
author
Mohammod Al Amin Ashik
committed
fix(ci): refresh apt lists before installing Linux deps
The runner image ships an apt index from its build date (2026-06-24), and cache-apt-pkgs-action's update_apt_lists_if_stale only runs under nektos/act -- it guards on ACT=true, so on real runners it is a no-op. Its premise ("GitHub Actions runners have fresh package lists") does not hold. Ubuntu published pipewire 1.0.5-1ubuntu3.3 and removed 3.2 from the pool, so apt resolved a .deb that 404s. The action runs apt-fast install without checking its exit code, so the failure was swallowed: it cached 0 packages as a 6 KB entry, which every later run restored as a hit and then skipped the install entirely -- leaving libglib2.0-dev absent and failing rust-check and ts-check on every branch, including main. Refreshing the index first makes apt resolve debs that actually exist.
1 parent baa44c9 commit 457d2db

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/actions/install-linux-deps/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ runs:
1313
using: composite
1414
steps:
1515
# Cache apt packages to avoid re-downloading on every run
16+
# The runner image ships an apt index from its build date, and
17+
# cache-apt-pkgs-action's own refresh (update_apt_lists_if_stale) is a
18+
# no-op outside nektos/act -- it guards on ACT=true. A stale index names
19+
# .debs that Ubuntu has since superseded and dropped from the pool, so the
20+
# install 404s; the action then caches the empty result instead of failing,
21+
# and every later run restores that as a hit and skips installing at all.
22+
- name: Refresh apt lists
23+
shell: bash
24+
run: sudo apt-get update
25+
1626
# Pinned to a SHA: `@latest` is a moving tag, so a broken upstream release
1727
# (e.g. v1.6.2) would otherwise roll straight into CI unreviewed.
1828
- name: Cache apt packages (base)

0 commit comments

Comments
 (0)