# docker/build-push-action

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/docker-build-push-action).**

5,314 stars · 722 forks · TypeScript · Apache-2.0

## Links

- GitHub: https://github.com/docker/build-push-action
- Homepage: https://github.com/marketplace/actions/build-and-push-docker-images
- awesome-repositories: https://awesome-repositories.com/repository/docker-build-push-action.md

## Topics

`buildx` `docker` `dockerhub` `github-actions` `github-actions-docker`

## Description

This project is a GitHub Action that automates the building and pushing of Docker container images to OCI registries. It functions as a multi-platform container builder and publisher using the Buildx engine to create images compatible with multiple hardware architectures.

The tool distinguishes itself through software supply chain security features, including the generation of software bills of materials and provenance attestations to verify image integrity. It optimizes construction speed via remote cache management and supports secure secret injection to prevent sensitive data from persisting in image layers.

The capability surface covers build context configuration, including the resolution of source code via Git URIs, and a metadata-driven tagging system for applying labels and version tags. It also provides execution summaries and statistics to audit build job results.

## Tags

### DevOps & Infrastructure

- [Multi-Architecture Images](https://awesome-repositories.com/f/devops-infrastructure/container-image-builders/multi-architecture-images.md) — Provides a comprehensive system for building and bundling container images for multiple CPU architectures and operating systems.
- [Automated Image Build Pipelines](https://awesome-repositories.com/f/devops-infrastructure/self-contained-deployments/bundled-image-deployment/automated-image-build-pipelines.md) — Automates the end-to-end process of building multi-platform images and pushing them to OCI registries. ([source](https://github.com/docker/build-push-action))
- [OCI Container Registry Clients](https://awesome-repositories.com/f/devops-infrastructure/artifact-registries/oci-artifact-retrieval/oci-container-registry-clients.md) — Implements an automated process for uploading container images to OCI-compliant registries with custom tagging.
- [Docker Image Builds](https://awesome-repositories.com/f/devops-infrastructure/automated-deployment-pipelines/docker-image-builds.md) — Automates the build and push cycle of Docker images as a core part of the CI pipeline.
- [Docker Container Deployments](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/container-runtimes/runtime-configuration-interfaces/docker-socket-orchestrators/docker-target-configurators/docker-container-deployments.md) — Integrates the image creation process into GitHub Actions to ensure images are ready for deployment.
- [Multi-Platform Builds](https://awesome-repositories.com/f/devops-infrastructure/containerization/image-building/multi-platform-builds.md) — Generates container images targeting multiple hardware architectures and operating systems for broad device compatibility.
- [Build Context Injectors](https://awesome-repositories.com/f/devops-infrastructure/build-context-injectors.md) — Manages the inclusion of local files and remote Git references within the container build context. ([source](https://github.com/docker/build-push-action/blob/master/README.md))
- [Build Configuration](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/configuration-lifecycle-management/build-configuration.md) — Provides configuration settings to define how source files and build modes are handled. ([source](https://github.com/docker/build-push-action))
- [Build Cache Optimizations](https://awesome-repositories.com/f/devops-infrastructure/container-image-builders/build-cache-optimizations.md) — Optimizes image construction speed through remote caching and specialized build-time mounts.
- [Container Image Tagging](https://awesome-repositories.com/f/devops-infrastructure/container-image-tagging.md) — Implements a metadata-driven system for applying version tags and labels to the resulting container images.

### Part of an Awesome List

- [BuildKit-Based Builds](https://awesome-repositories.com/f/awesome-lists/devtools/image-build-and-analysis/custom-image-builds/buildkit-based-builds.md) — Utilizes the BuildKit engine via Buildx to perform efficient, concurrent container image construction.

### Development Tools & Productivity

- [Cross-Platform Build Targets](https://awesome-repositories.com/f/development-tools-productivity/cross-platform-build-targets.md) — Enables the specification of multiple hardware architectures as target platforms for the build process. ([source](https://github.com/docker/build-push-action/blob/master/action.yml))
- [Remote Cache Management](https://awesome-repositories.com/f/development-tools-productivity/build-caches/remote-cache-management.md) — Accelerates build times by fetching and exporting layer caches to an external registry. ([source](https://github.com/docker/build-push-action))
- [Build Configurations](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-configuration-systems/build-configurations.md) — Allows the definition of build-time variables, labels, and target stages to control image construction. ([source](https://github.com/docker/build-push-action/blob/master/action.yml))
- [Build Context Resolution](https://awesome-repositories.com/f/development-tools-productivity/git-based-dependency-fetching/build-context-resolution.md) — Allows source code to be fetched directly from Git URIs to serve as the build context.
- [Remote Build Caches](https://awesome-repositories.com/f/development-tools-productivity/remote-build-caches.md) — Accelerates builds by exporting and importing layer caches via external OCI registries.

### Security & Cryptography

- [SBOM Attestation Generation](https://awesome-repositories.com/f/security-cryptography/sbom-attestation-generation.md) — Generates verifiable software bills of materials and provenance attestations for supply chain security.
- [Software Supply Chain Security](https://awesome-repositories.com/f/security-cryptography/software-supply-chain-security.md) — Secures the software supply chain by generating SBOMs and provenance attestations for container images.
- [Secret Injection Mechanisms](https://awesome-repositories.com/f/security-cryptography/secret-injection-mechanisms.md) — Injects sensitive credentials into the build process using temporary mounts to prevent secrets from persisting in image layers. ([source](https://github.com/docker/build-push-action))
- [Secret Mounts](https://awesome-repositories.com/f/security-cryptography/secret-management/secret-mounts.md) — Injects sensitive credentials into the build process using ephemeral mounts to keep them out of image layers.

### Software Engineering & Architecture

- [Container Image Metadata](https://awesome-repositories.com/f/software-engineering-architecture/metadata-attachments/container-image-metadata.md) — Attaches custom labels, version tags, and provenance records to the resulting container images. ([source](https://github.com/docker/build-push-action/blob/master/README.md))
- [Software Bill of Materials Generators](https://awesome-repositories.com/f/software-engineering-architecture/software-bill-of-materials-generators.md) — Automatically generates comprehensive software bills of materials and inventories of components during the build process.
