From a86ba89eadf41fac5c6135ffcd56b5b374fef119 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Fri, 21 Nov 2025 08:11:56 +0200 Subject: [PATCH] fix: correct sed pattern in go-build Dockerfile parsing Remove unintended space in sed replacement pattern that was extracting golang version from Dockerfile. Before: s/.*golang:([0-9]+(\.[0-9]+)*)(-[^:]*)?.*/ \1/p After: s/.*golang:([0-9]+(\.[0-9]+)*)(-[^:]*)?.*/\1/p The leading space in the replacement would have caused version strings to have unwanted whitespace, potentially breaking version validation. --- go-build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-build/action.yml b/go-build/action.yml index b4d8fb0..6b98e12 100644 --- a/go-build/action.yml +++ b/go-build/action.yml @@ -97,7 +97,7 @@ runs: if [ -z "$detected_version" ] && [ -f Dockerfile ]; then echo "Checking Dockerfile for golang..." >&2 version=$(grep -iF "FROM" Dockerfile | grep -F "golang:" | head -1 | \ - sed -n -E "s/.*golang:([0-9]+(\.[0-9]+)*)(-[^:]*)?.*/ \1/p" || echo "") + sed -n -E "s/.*golang:([0-9]+(\.[0-9]+)*)(-[^:]*)?.*/\1/p" || echo "") if [ -n "$version" ]; then version=$(clean_version "$version") if validate_version "$version"; then