wgtechlabs/Container Build Flow Action

Automated Docker/Container builds with PR/WIP/DEV/PATCH/Release flow support for Docker Hub and GitHub Container Registry

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
registryTarget container registry (docker-hub, ghcr, or both)noboth
dockerhub-usernameDocker Hub username (required if registry includes docker-hub)no""
dockerhub-tokenDocker Hub access token (required if registry includes docker-hub)no""
ghcr-tokenGitHub token for GHCR (defaults to GITHUB_TOKEN)no""
ghcr-usernameGitHub username for GHCR (defaults to repository owner)no""
main-branchName of the main/production branchnomain
dev-branchName of the development branchnodev
dockerfilePath to Dockerfileno./Dockerfile
contextBuild context pathno.
platformsTarget platforms (comma-separated, e.g., linux/amd64,linux/arm64)nolinux/amd64
release-platformsTarget platforms for release builds (overrides platforms for release flows). Set to empty string to use the same platforms as non-release builds.nolinux/amd64,linux/arm64
build-argsBuild arguments (newline-separated, e.g., ARG1=value1)no""
labelsImage labels (newline-separated, e.g., key=value)no""
cache-enabledEnable build cachenotrue
image-nameContainer image name (defaults to repository name)no""
tag-prefixPrefix for image tags (e.g., v1-)no""
tag-suffixSuffix for image tags (e.g., -alpine)no""
pr-comment-enabledEnable PR comments with pull instructionsnotrue
pr-comment-templateCustom PR comment template (supports variables: {BUILD_FLOW}, {IMAGE_TAGS}, {REGISTRY_URLS})no""
push-enabledEnable pushing to registry (set to false for testing)notrue
load-enabledLoad image to Docker daemon (useful for local testing)nofalse
provenanceEnable provenance attestationnotrue
sbomEnable SBOM attestationnotrue
pre-build-scan-enabledEnable pre-build security scanning (source code + Dockerfile)notrue
scan-source-codeScan source code and dependencies before buildingnotrue
scan-dockerfileScan Dockerfile for misconfigurations and best practicesnotrue
image-scan-enabledEnable post-build container image scanningnotrue
trivy-severityTrivy severity levels to scan (comma-separated: UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL)noHIGH,CRITICAL
trivy-ignore-unfixedIgnore vulnerabilities without available fixesnofalse
trivy-timeoutTrivy scan timeout duration (e.g., 5m0s, 10m0s)no10m0s
trivy-skip-dirsDirectories to skip during Trivy scan (comma-separated)no""
trivy-skip-filesFiles to skip during Trivy scan (comma-separated)no""
upload-sarifUpload vulnerability scan results to GitHub Security tab (SARIF format)notrue
sarif-category-sourceSARIF category name for source code scannotrivy-source-scan
sarif-category-dockerfileSARIF category name for Dockerfile scannotrivy-dockerfile-scan
sarif-category-imageSARIF category name for container image scannotrivy-container-scan
vulnerability-comment-enabledAdd comprehensive vulnerability scan results to PR commentsnotrue
enable-image-comparisonCompare vulnerabilities with baseline imagenofalse
comparison-baseline-imageBaseline image tag to compare against (e.g., myapp:latest)no""
fail-on-vulnerabilityFail the build if vulnerabilities are found at or above trivy-severity levelnofalse
commit-convention-enabledEnable smart build filtering based on commit message conventions. When enabled, only commits with build-relevant types (e.g., new, fix, update) trigger builds. Commits like docs or test changes are skipped.nofalse
commit-conventionCommit message convention to parse. Affects default trigger/skip type lists when not explicitly overridden. clean-commit uses types like new, update, setup; conventional uses feat, fix, perf, etc.noclean-commit
build-trigger-typesComma-separated commit types that trigger a container build. If a type appears in both trigger and skip lists, skip takes priority. Leave empty to use convention-aware defaults.no""
build-skip-typesComma-separated commit types that skip the container build. Skip list is checked before trigger list, so skip takes priority if a type appears in both. Leave empty to use convention-aware defaults.no""
release-tag-patternRegex pattern to match release tags that trigger container builds. Non-matching tags (e.g., monorepo per-package tags like @scope/pkg@1.0.0) are skipped. Use empty string to allow all release tags.no^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$
bot-detectionAuto-detect bot actors (e.g., dependabot[bot], renovate[bot]) and skip the build. Prevents CI failures from missing secrets on bot-generated PRs.notrue
bot-detection-modeControls which identity is evaluated for bot detection: smart (default, uses PR author for PR events), actor (always uses github.actor), or pr-author (always uses PR author when available). See README for details.nosmart
floating-tagsPush a mutable floating tag (e.g., dev, pr, patch, staging, wip) for each non-release build in addition to the SHA-pinned tag. Useful for always pulling the latest build of a given flow type without updating the SHA manually.nofalse
namedescription
image-tagsComplete list of applied image tags
registry-urlsFull image URLs for each registry
build-digestSHA256 digest of the built image
build-flow-typeDetected build flow type (pr, dev, patch, staging, wip, release, skip). Returns skip when a bot actor is detected, the commit convention gate blocks the build, or a release tag does not match the expected pattern.
short-shaShort commit SHA used in tags
release-versionClean version string from release tag (e.g., 1.2.3). Only populated for release flows.
vulnerability-scan-completedWhether vulnerability scanning completed successfully (true/false)
total-vulnerabilitiesTotal number of vulnerabilities found
critical-vulnerabilitiesNumber of CRITICAL severity vulnerabilities
high-vulnerabilitiesNumber of HIGH severity vulnerabilities
medium-vulnerabilitiesNumber of MEDIUM severity vulnerabilities
low-vulnerabilitiesNumber of LOW severity vulnerabilities
commit-typeDetected commit type from the commit message (e.g., new, fix, docs). Only populated when commit-convention-enabled is true.
bot-detectedWhether a bot was detected (true/false). Always set, even when bot-detection is disabled (returns false in that case).
bot-evaluation-subjectThe identity evaluated for bot detection (actor, pr-author, or none when detection is disabled).
bot-evaluation-valueThe actual login value that was evaluated for bot detection (e.g., dependabot[bot] or warengonzaga). Empty when detection is disabled.
build-skip-reasonReason the build was skipped (bot detection or commit convention gate). Empty if the build proceeded.