Skip to content

perf(ci): cache docker layers, skip docs-only builds, add GHCR retention#33

Merged
Exploitacious merged 1 commit into
mainfrom
perf/ci-docker-cache
Jul 1, 2026
Merged

perf(ci): cache docker layers, skip docs-only builds, add GHCR retention#33
Exploitacious merged 1 commit into
mainfrom
perf/ci-docker-cache

Conversation

@Exploitacious

Copy link
Copy Markdown
Owner

Summary

  • Every push has been a cold Docker build (no layer cache), and the GHCR image has never been pruned — it grows unbounded.
  • Adds GHA layer cache (type=gha / type=gha,mode=max) to the docker/build-push-action@v7 step, so the npm-install layer gets reused across builds instead of reinstalling every push.
  • Adds paths-ignore: ['**.md'] to the push trigger so docs-only commits stop triggering a full rebuild + GHCR push.
  • Adds a manual, dry-run-by-default ghcr-cleanup.yml workflow (workflow_dispatch only, no schedule) using dataaxiom/ghcr-cleanup-action@v1 to prune untagged images and keep the last 10 tagged, excluding latest.

Test plan

  • Merge and confirm next main push shows cache hits in the build-push-action logs
  • Push a docs-only (.md) commit and confirm the workflow does not run
  • Run "GHCR cleanup" manually with dry_run: true and review the preview output before ever running it for real

@Exploitacious Exploitacious merged commit 73d92e9 into main Jul 1, 2026
2 checks passed
@Exploitacious Exploitacious deleted the perf/ci-docker-cache branch July 1, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant