Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ on:
description: "Enable Hadolint"
default: true
type: boolean
platforms:
description: "Build platforms"
default: "linux/amd64,linux/arm64"
type: string
secrets:
username:
required: false
Expand Down Expand Up @@ -71,7 +75,7 @@ jobs:
with:
context: ${{ inputs.context }}
file: ${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64
platforms: ${{ inputs.platforms }}
push: ${{ inputs.push }}
tags: ${{ inputs.image-name }}:${{ inputs.image-tag }}

Expand Down
23 changes: 12 additions & 11 deletions docker-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ This reusable GitHub Actions workflow automates the process of building and push

## ⚙️ Inputs

| Name | Description | Required | Default |
| ----------------- | ---------------------------------------------------------------------------------- | -------- | -------------- |
| `image-name` | Name of Docker Image (e.g., 'myimage', 'myorg/myimage') | true | - |
| `image-tag` | Tag to apply to the built image (e.g., 'latest', 'v1.2.3') | No | `"latest"` |
| `dockerfile` | Path to the Dockerfile to build (e.g., './Dockerfile', './docker/Dockerfile') | No | `"Dockerfile"` |
| `context` | Path to Docker Build Context | No | `"."` |
| `registry` | Docker Registry | No | `"docker.io"` |
| `push` | Push Docker Image to Registry | No | `false` |
| `security-scan` | Enable Trivy Security Scan | No | `true` |
| `security-report` | Security Report Mode (`"sarif"` \| `"comment"`; ignored if `security-scan: false`) | No | `"sarif"` |
| `hadolint` | Enable Hadolint | No | `true` |
| Name | Description | Required | Default |
| ----------------- | ---------------------------------------------------------------------------------- | -------- | --------------------------- |
| `image-name` | Name of Docker Image (e.g., 'myimage', 'myorg/myimage') | true | - |
| `image-tag` | Tag to apply to the built image (e.g., 'latest', 'v1.2.3') | No | `"latest"` |
| `dockerfile` | Path to the Dockerfile to build (e.g., './Dockerfile', './docker/Dockerfile') | No | `"Dockerfile"` |
| `context` | Path to Docker Build Context | No | `"."` |
| `platforms` | Indicates which platforms the image should be built for | No | `"linux/amd64,linux/arm64"` |
| `registry` | Docker Registry | No | `"docker.io"` |
| `push` | Push Docker Image to Registry | No | `false` |
| `security-scan` | Enable Trivy Security Scan | No | `true` |
| `security-report` | Security Report Mode (`"sarif"` \| `"comment"`; ignored if `security-scan: false`) | No | `"sarif"` |
| `hadolint` | Enable Hadolint | No | `true` |

## 🔐 Secrets

Expand Down