Files
actions/language-version-detect
Ismo Vuorinen d22d5c7ee9 refactor: make language-version-detect self-contained
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.
2025-11-20 08:59:23 +02:00
..
2025-11-19 15:42:06 +02:00
2025-11-19 15:42:06 +02:00

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: ""