Skip to content

FOLLOW-UP: Add Docker layer caching with buildx (from PR #162) #163

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #162.

Source PR: #162
PR Title: ci: add Docker build job with image size validation
Suggested by: @claude[bot]

Task Description

The Docker build CI job runs from cold on every CI run — re-pulling node:20-alpine, golang:1.26-alpine base images, running npm ci, and go mod download each time. For a multi-stage build this adds up.

Implementation

Add docker/setup-buildx-action and use GitHub Actions cache:

- uses: docker/setup-buildx-action@v3

- name: Build Docker image
  uses: docker/build-push-action@v5
  with:
    context: .
    push: false
    load: true
    tags: tinkerdown:ci-test
    build-args: |
      VERSION=ci-test
      BUILD_TIME=${{ ... }}
    cache-from: type=gha
    cache-to: type=gha,mode=max

Benefits

  • Significantly faster CI builds after first run (cached layers)
  • Reduced GitHub Actions compute time

This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowLow: extended features, operational docsfollow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions