Repository: https://github.com/Netcracker/.github
Path: workflow-templates/dev-docker-build-multiple-images.yml
GitHub Actions workflow template that builds and publishes multiple Docker images from a single repository according to configuration defined in .qubership/docker.cfg.
Main features:
- Builds several Docker images in parallel (matrix strategy)
- Supports multi-platform builds (when specified in config)
- Publishes images to GitHub Container Registry (ghcr.io) or other registry configured via secrets
- Automatic tagging based on branch/tag name
- Manual override tags via workflow_dispatch
- Dry-run mode (build without push)
- Uses centralized custom actions from
netcracker/qubership-workflow-hub
Copy the whole template into your repository and customize it if needed.
| File | Mandatory | Purpose |
|---|---|---|
.qubership/docker.cfg |
Yes | Main configuration – defines which images to build, contexts, Dockerfiles, platforms |
Dockerfile (or multiple) |
Yes | Standard Dockerfiles referenced from the config |
Example location of config:
docker-config-resolver action documentation
See detailed documentation:
→ docker-config-resolver action documentation
pushto any branch (except paths in.github/**,docs/**, etc.)pull_requestto any branchworkflow_dispatch(manual trigger)
| Name | Type | Default | Description |
|---|---|---|---|
tags |
string | "" |
Extra tags (comma separated) |
dry-run |
boolean | false |
Build images but do not push them |
replace-symbol |
string | "_" |
Symbol used to replace invalid chars in tags |
Default pattern:
- Branch build →
ghcr.io/<owner>/<repo>:feature_new-login - PR build →
ghcr.io/<owner>/<repo>:pr-123 - Tag build →
ghcr.io/<owner>/<repo>:v1.2.3,ghcr.io/<owner>/<repo>:1.2.3 - Manual extra tags are appended
Invalid characters (e.g. /) are replaced with _ (configurable via replace-symbol input).
permissions:
contents: read
packages: write # required to push to ghcr.io-
load-config
Reads.qubership/docker.cfg→ produces matrix of components -
docker-build(matrix job)
One instance per component defined in config- Checks out code
- Generates tags
- Builds & pushes (or dry-runs) using centralized
docker-action
All actions come from the same version:
netcracker/qubership-workflow-hub/actions/docker-config-resolver@v2.0.7netcracker/qubership-workflow-hub/actions/metadata-action@v2.0.7netcracker/qubership-workflow-hub/actions/docker-action@v2.0.7
Pinned to commit c1a5c8c2d9c2a79f548134db1d095f36ee0f28e7
- Use GitHub Packages (
ghcr.io) – no extra secrets needed (token is automatic) - For Docker Hub → add
DOCKER_USERNAME+DOCKER_PASSWORDsecrets and adjust config - Consider adding
pull_request_targetif you want PRs from forks to build images (careful with permissions)
Happy building! 🐳