Navigate:
All Reposbuild-push-action
~$BUILDP0.1%

build-push-action: Docker image building with Buildx

GitHub Action for building and publishing Docker images.

LIVE RANKINGS • 06:51 AM • STEADY
OVERALL
#157
51
CLOUD & DEVOPS
#7
5
30 DAY RANKING TREND
ovr#157
·Cloud#7
STARS
5.1K
FORKS
699
DOWNLOADS
7D STARS
+7
7D FORKS
0
See Repo:
Share:

Learn more about build-push-action

build-push-action is a GitHub Action that orchestrates Docker image construction and registry publishing through Buildx, which wraps the Moby BuildKit builder toolkit. The action integrates with GitHub's workflow system to execute container builds with access to BuildKit's advanced features including multi-architecture compilation, remote cache backends, and secret injection. It operates by translating workflow inputs into Buildx commands, supporting both Git-based context (where BuildKit clones the repository directly) and local filesystem context (when used with actions/checkout). Common deployment scenarios include CI/CD pipelines that build images on push events, pull request validation, and scheduled builds for multi-platform distribution across architectures like amd64, arm64, and others.

build-push-action

1

BuildKit integration

Provides direct access to Moby BuildKit capabilities including advanced caching, secrets handling, and build arguments without requiring manual BuildKit configuration. The action abstracts BuildKit complexity while exposing its full feature set.

2

Git context support

By default uses Git references as build context, allowing BuildKit to clone and build directly from repository state without requiring a separate checkout step. Supports Handlebars templating for context path specification.

3

Multi-platform builds

Works with setup-qemu-action and setup-buildx-action to enable cross-architecture compilation in a single workflow, producing images for multiple platforms like amd64, arm64, and others simultaneously.


name: Build and Push
on:
  push:
    branches: [main]
jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: docker/build-push-action@v5
        with:
          context: .
          push: true
          tags: user/app:latest

vv6.18.0

Adds Docker Build Cloud support for build summaries; updates actions-toolkit dependency to 0.62.1.

  • Enable build summary reporting when using Docker Build Cloud by upgrading to this release.
  • Review actions-toolkit changelog for dependency changes introduced in the 0.61.0 to 0.62.1 bump.
vv6.17.0

Build records now export via `buildx history export` instead of the legacy export-build tool.

  • Update workflows if you parse build record output; the export format may differ from the old tool.
  • No action required for standard usage; the change is internal to the actions-toolkit dependency.
vv6.16.0

Maintenance release improving secret handling in build summaries and fixing attestation environment variable behavior.

  • Build summary output now masks secret values and prints only their keys to prevent credential leakage in logs.
  • Action correctly handles missing default attestations environment variable instead of failing or misinterpreting it.

See how people are using build-push-action

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers