ci: weekly scheduled rebuild to refresh container base layers#2242
Open
pjordanandrsn wants to merge 1 commit into
Open
ci: weekly scheduled rebuild to refresh container base layers#2242pjordanandrsn wants to merge 1 commit into
pjordanandrsn wants to merge 1 commit into
Conversation
The alexxit/go2rtc:latest and ghcr.io/alexxit/go2rtc:master images rebuild only on push to master and on tag. Between tagged releases the alpine base accumulates security fixes that aren't picked up — a trivy scan of v1.9.14 (2026-01-19) on 2026-05-02 found 4 CRITICAL + 24 HIGH OS CVEs, all in alpine packages, none in go2rtc itself. Adding a weekly schedule lets existing build jobs run with --pull semantics so :master / :latest stay current with base-layer fixes. The gha cache means re-runs are fast (only base layers re-pulled).
geekho-me
added a commit
to geekho-me/go2rtc
that referenced
this pull request
May 23, 2026
Adds a weekly schedule (Sunday 04:00 UTC) to the Docker-image build workflow so the master/latest images pick up Alpine and Python base-layer CVE fixes between tagged go2rtc releases. Also sets pull:true on docker/build-push-action@v6. Without this, the GitHub-Actions layer cache can indefinitely re-use a vulnerable `apk add` layer because the cache key matches the unchanged instruction text -- the rebuild would just cache-hit and produce an identical image. pull:true bumps the parent layer SHA whenever Alpine ships a refreshed base image, which invalidates downstream cache and forces apk to re-install at current package versions. Test workflow is workflow_dispatch only and doesn't need a schedule. No code change, no test impact. Pattern adopted from upstream PR AlexxIT#2242. The fork's workflow is Docker-only (no build-binaries job) so the trade-off discussed there doesn't apply here. CHANGES.md gains a new "CI / Build" section (sec 16) recording the change. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
alexxit/go2rtc:latestandghcr.io/alexxit/go2rtc:mastercontainer images currently rebuild only onpushtomasterand on tag. Between tagged releases, the alpine base layer accumulates security fixes that aren't picked up.Latest published image (
v1.9.14,2026-01-19) scanned with trivy on2026-05-02:All findings are in alpine OS packages — none in go2rtc itself. Rebuilding the same
docker/Dockerfileagainst currentpython:3.13-alpinereduces these to 0 HIGH/CRITICAL without any source change.Change
Adds a
schedule:trigger to the existingBuild and Pushworkflow:Existing jobs already use
--pullsemantics viadocker/build-push-action@v5pluscache-from: type=gha/cache-to: type=gha,mode=max, so subsequent rebuilds are fast (only base layers re-pulled).Tradeoff
This also re-runs the
build-binariesjob weekly. If you'd rather isolate the docker rebuilds, I can split it into a separaterebuild-containers.ymlworkflow that calls only the threedocker-*jobs — happy to switch to that pattern if preferred.Verified locally
docker build --pull -t local/go2rtc:rebuilt -f docker/Dockerfile .against current alpine + python:3.13 → 0 HIGH/CRITICAL OS CVEs.