https://github.com/martoc/action-container-build
Build and push multi-platform container images to Docker Hub, AWS ECR, and GCP Artifact Registry
https://github.com/martoc/action-container-build
cdf
Last synced: 5 months ago
JSON representation
Build and push multi-platform container images to Docker Hub, AWS ECR, and GCP Artifact Registry
- Host: GitHub
- URL: https://github.com/martoc/action-container-build
- Owner: martoc
- License: mit
- Created: 2024-02-12T00:07:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-02T18:38:07.000Z (6 months ago)
- Last Synced: 2026-01-09T03:31:56.614Z (6 months ago)
- Topics: cdf
- Language: Makefile
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Governance: .github/GOVERNANCE.md
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
# action-container-build
A GitHub Action that builds and pushes container images to Docker Hub, AWS ECR, and GCP Artifact Registry. Supports multi-platform builds (linux/arm64, linux/amd64) using Docker buildx and automatically applies OCI-compliant container labels.
## Features
- Multi-registry support: Docker Hub, AWS ECR, GCP Artifact Registry
- Multi-platform builds using Docker buildx
- Automatic OCI-compliant container labelling
- Configurable build arguments and platforms
## Quick Start
```yaml
- name: Build & Push Container Image
uses: martoc/action-container-build@v0
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
```
## Documentation
- [Usage Guide](./docs/USAGE.md) - Detailed usage instructions and examples
- [Code Style](./docs/CODESTYLE.md) - Code style guidelines for contributors
## Inputs
| Input | Description | Required | Default |
|-------|-------------|----------|---------|
| `registry` | Registry to push to (`docker.io`, `gcp`, `aws`) | No | `docker.io` |
| `region` | Region for GCP or AWS | No | `""` |
| `repository_name` | Repository name | No | `""` |
| `aws_account_id` | AWS Account ID | No | `""` |
| `gcp_project_id` | Google Cloud Project ID | No | `""` |
| `platforms` | Build platforms | No | `linux/arm64,linux/amd64` |
| `build_args` | Additional build arguments | No | `""` |
## Environment Variables
| Variable | Description |
|----------|-------------|
| `TAG_VERSION` | Version tag for the container image (required) |
| `DOCKER_USERNAME` | Docker Hub username (required for docker.io) |
| `DOCKER_PASSWORD` | Docker Hub password (required for docker.io) |
## Licence
This project is licenced under the MIT Licence - see the [LICENCE](LICENSE) file for details.