lfreleng-actions/Build Metadata Action
Universal action to capture, validate, and display comprehensive metadata for project builds across multiple languages and build systems
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 9, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/build-metadata-action@441d941775995fa0d562ee80b4cc6ed1230248ec # v0.6.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path_prefix | Path to the project root directory | no | . |
| output_format | Output format: summary, json, markdown, yaml | no | summary |
| include_environment | Collect and include environment metadata | no | true |
| use_version_extract | Use version-extract-action for version detection if available | no | true |
| verbose | Enable verbose logging output | no | false |
| artifact_upload | Upload gathered metadata as workflow artifacts | no | true |
| artifact_name_prefix | Custom prefix for artifact names | no | build-metadata |
| artifact_formats | Comma-separated list of formats to upload (json, yaml) | no | json |
| validate_output | Validate JSON/YAML output before uploading | no | true |
| strict_validation | Use strict validation mode (round-trip testing) | no | true |
| export_env_vars | Export action outputs as variables for subsequent steps | no | false |
| python_offline_mode | When 'true', the Python extractor skips the live endoflife.date consultation and uses the action's static supported-version list (3.10 through 3.14 at the time of writing). Useful for hermetic builds or when the runner has no outbound network access. Default 'false' so the extractor benefits from live EOL data. | no | false |
| python_eol_timeout | endoflife.date HTTP timeout in seconds (online mode only) | no | 5 |
| python_eol_max_retries | endoflife.date HTTP retry budget (online mode only). Set to '0' to opt out of retries entirely (a single attempt with no retry on failure). Values are integers; negative values are treated as the documented default ('2'). | no | 2 |
Outputs
| name | description |
|---|---|
| metadata_json | Complete metadata as JSON string |
| metadata_yaml | Complete metadata as YAML string |
| markdown_output | Markdown formatted metadata |
| artifact_name | Name of the uploaded artifact |
| artifact_path | Path to artifact directory |
| artifact_files | Comma-separated list of artifact files |
| project_type | Detected project type (e.g., python-modern, javascript-npm) |
| project_name | Project name |
| project_version | Project version |
| project_path | Absolute path to project |
| version_source | Source file where version was found |
| version_properties_version | Version parsed from version.properties; empty when absent |
| version_properties_match | Whether version.properties matches project_version (true/false; empty when not comparable) |
| snapshot_version | Synthesized interim version (X.Y.Z-SNAPSHOT convention) |
| release_files | Comma-separated release request files under releases/ (global-jjb / LF release convention); empty when none are present |
| release_file_count | Number of release request files found under releases/ |
| is_release_ready | Returns true when at least one release request file is present under releases/ (drives the promote/tag lane) |
| release_version | Version parsed from a lone release file; empty when several exist (the caller disambiguates via changed files) |
| release_ref | Git ref parsed from a lone release file; empty when several exist |
| versioning_type | Versioning type: 'static' or 'dynamic' |
| build_timestamp | Build timestamp (ISO 8601) |
| git_sha | Git commit SHA |
| git_branch | Git branch name |
| git_tag | Git tag (if on a tag) |
| ci_platform | CI platform (github, gitlab, circleci, etc.) |
| ci_run_id | CI run ID |
| ci_run_url | CI run URL |
| runner_os | Runner operating system |
| runner_arch | Runner architecture |
| python_package_name | Python package name |
| python_requires_python | Required Python version |
| python_build_backend | Python build backend |
| python_metadata_source | Source of Python metadata (pyproject.toml, setup.py, etc.) |
| python_versioning_type | Python versioning type: 'static' or 'dynamic' |
| python_matrix_json | Python version matrix as JSON |
| python_build_version | Recommended Python version for building (latest from matrix) |
| python_dynamic_provider | When versioning_type is dynamic, identifies the provider responsible for resolving the version at build time (pbr, setuptools-scm, versioneer, setuptools-dynamic, runtime-attr). |
| python_requires_python_fallback | true when the action could not determine a Python version from the project metadata and resorted to the canonical default matrix. Consumers should surface this as a warning to the user. |
| python_requires_python_source | Source from which the supported-Python-version list was derived. One of: "requires-python" - derived from [project].requires-python (pyproject) or python_requires (setup.cfg / setup.py); "classifiers" - derived from PEP 301 trove classifiers; "poetry-dependencies" - derived from [tool.poetry.dependencies].python in pyproject.toml; "static-fallback" - no version signal was found and the action fell back to its hard-coded supported set; "out-of-range-fallback" - the constraint parsed cleanly but matched no Python version supported by this action (e.g. requires-python = ">=4.0"); the action widened the matrix to the supported set so the workflow could proceed and emitted a ::warning:: plus a $GITHUB_STEP_SUMMARY entry; "parse-error-fallback" - the constraint failed to parse (e.g. a malformed PEP 440 specifier); the action widened the matrix to the supported set as a defensive fallback and emitted a ::warning:: so the user sees the parse failure; empty - the extractor was not invoked (non-Python project). |
| python_version_unresolved | true when the project version is dynamic but cannot be resolved without a build-time signal (e.g. PBR without a tag or PBR_VERSION). |
| python_dependencies_source | Source from which the dependency list was loaded (typically "requirements.txt" for projects that delegate install_requires). |
| python_eol_versions | Space-separated list of Python versions in the resolved matrix that the live endoflife.date API marks as end-of-life. Versions below the action's baseline floor (see pyversions.Baseline()) can never appear here because they are not in the supported set in the first place; this output surfaces matrix versions that have reached EOL since they entered the supported set. Empty when offline mode is selected, when the live API is unreachable, or when no EOL version intersects the matrix. Consumers (typically python-build-action) can branch on this to warn, strip, or fail their own build steps. |
| python_eol_versions_present | "true" when python_eol_versions is non-empty (one or more EOL versions are in the resolved matrix); "false" otherwise. Provided as a stable boolean for workflow `if:` predicates so consumers do not need to test the string for emptiness. Empty (not "false") when the Python extractor is not invoked -- e.g. for non-Python projects -- because `cmd/build-metadata/main.go` only emits `python_*` outputs for the detected language. Consumers running against mixed-language repos should therefore default to treating an empty value as "no EOL hits". |
| python_project_match_package | Whether Python project name matches package name |
| project_match_repo | Whether project name matches repository name |
| javascript_package_name | JavaScript package name |
| javascript_package_manager | Detected package manager (npm, yarn, pnpm, bun) |
| javascript_lock_file | Lock file name |
| javascript_has_lock_file | Whether lock file exists |
| javascript_module_type | Module type (module, commonjs) |
| javascript_requires_node | Required Node.js version |
| javascript_is_workspace | Whether project is a workspace/monorepo |
| javascript_has_typescript | Whether project uses TypeScript |
| java_group_id | Java/Maven group ID |
| java_artifact_id | Java/Maven artifact ID |
| java_packaging | Java/Maven packaging type (jar, war, pom, etc.) |
| java_metadata_source | Source of Java metadata (pom.xml, build.gradle, etc.) |
| java_has_parent | Whether Maven project has a parent POM |
| java_is_multi_module | Whether Maven project is multi-module |
| java_module_count | Number of Maven modules |
| java_build_dsl | Gradle build DSL (groovy or kotlin) |
| java_is_multi_project | Whether Gradle project is multi-project |
| java_version | Required Java version |
| java_version_source | Where the Java version was detected (e.g. maven.compiler.release, maven-compiler-plugin/release, module:<name>, toolchain) |
| java_frameworks | Detected Java frameworks (Spring Boot, Quarkus, etc.) |
| go_base_name | Friendly project name derived from the Go module path (the final path element, with any semantic import versioning /vN suffix stripped, e.g. github.com/user/repo/v2 -> repo) |
| go_module_path | Go module path declared in go.mod |
| go_go_version | Minimum Go version declared in go.mod (go directive) |
| go_metadata_source | Source of Go metadata (go.mod) |
| go_toolchain | Toolchain directive from go.mod (empty when absent) |
| go_dependencies | Comma-separated list of direct dependencies in module@version form |
| go_indirect_dependencies | Comma-separated list of indirect dependencies in module@version form |
| go_dependency_count | Number of direct dependencies |
| go_total_dependency_count | Total number of dependencies (direct plus indirect) |
| go_dependency_map | JSON object mapping each dependency module to its version |
| go_replace_directives | JSON array of replace directives from go.mod, each an object with 'old' and 'new' keys |
| go_replace_count | Number of replace directives in go.mod |
| go_exclude_directives | Comma-separated list of exclude directives from go.mod |
| go_exclude_count | Number of exclude directives in go.mod |
| go_retract_directives | Comma-separated list of retract directives from go.mod |
| go_retract_count | Number of retract directives in go.mod |
| go_frameworks | Comma-separated list of detected Go frameworks and tools (Gin, Cobra, gRPC, Testify, etc.) |
| go_go_version_matrix | Comma-separated list of Go versions to test against: the supported (non-EOL) Go releases at or above the go.mod minimum. Sourced live from endoflife.date with a static fallback when the API is unreachable. |
| go_matrix_json | Go version test matrix as JSON, ready for workflow matrix strategies (e.g. {"go-version": ["1.25", "1.26"]}) |
| success | Whether extraction succeeded |