mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-30 07:40:37 +00:00
Inline version-file-parser logic into language-version-detect to eliminate external dependency and make the action fully self-contained. Changes: - Replace external call to version-file-parser with inline parsing script - Use POSIX sh for maximum compatibility - Streamlined version detection logic focusing on 4 supported languages - Priority: .tool-versions > Dockerfile > devcontainer.json > version files > config files > default Benefits: - No external action dependencies - Faster execution (no action setup overhead) - Easier to maintain and test - Reduced surface area for security issues The action now handles all version detection inline while maintaining the same outputs and functionality.
ivuorinen/actions/language-version-detect
Language Version Detect
Description
Detects language version from project configuration files with support for PHP, Python, Go, and .NET.
Inputs
| name | description | required | default |
|---|---|---|---|
language |
Language to detect version for (php, python, go, dotnet) |
true |
"" |
default-version |
Default version to use if no version is detected |
false |
"" |
token |
GitHub token for authentication |
false |
"" |
Outputs
| name | description |
|---|---|
detected-version |
Detected or default language version |
package-manager |
Detected package manager (python: pip/poetry/pipenv, php: composer) |
Runs
This action is a composite action.
Usage
- uses: ivuorinen/actions/language-version-detect@v2025
with:
language:
# Language to detect version for (php, python, go, dotnet)
#
# Required: true
# Default: ""
default-version:
# Default version to use if no version is detected
#
# Required: false
# Default: ""
token:
# GitHub token for authentication
#
# Required: false
# Default: ""