Navigate:
Build Push Action
~$BPA0.2%

build-push-action: Docker image building with Buildx

GitHub Action for building and publishing Docker images.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#338
78
CLOUD & DEVOPS
#24
11
30 DAY RANKING TREND
ovr#338
·Cloud#24
STARS
5.2K
FORKS
714
7D STARS
+9
7D FORKS
+4
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

This release updates the underlying Docker actions toolkit dependency and adds support for build summaries with Docker Build Cloud.

  • Bump @docker/actions-toolkit from 0.61.0 to 0.62.1
vv6.17.0

This release updates the Docker actions toolkit dependency and modernizes build record export to use the newer buildx history export command.

  • Bump @docker/actions-toolkit from 0.59.0 to 0.61.0
vv6.16.0

This release improves environment variable handling, security output, and updates dependencies.

  • Handle no default attestations env var
  • Only print secret keys in build summary output
  • Bump @docker/actions-toolkit from 0.56.0 to 0.59.0


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers