sbt-typelevel-github-actions: JobEnvironment prevents templating url
Currently, JobEnvironment requires a java.net.URL, which seems to prevent certain usecases such as templating based on a step output - e.g. as in https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.
I think a variant should be added that allows passing an arbitrary string that doesn't get parsed as a URL.
According to me modify JobEnvironment to accept both URL and String values.
Steps to Fix: Introduce an alternative constructor that takes a raw string instead of a java.net.URL. Modify internal handling to support both URL validation (when needed) and raw string inputs. Ensure backward compatibility with existing code that already uses URL.
import java.net.URL
sealed trait JobEnvironment { def value: String }
final case class UrlEnvironment(url: URL) extends JobEnvironment { override def value: String = url.toString }
final case class StringEnvironment(rawValue: String) extends JobEnvironment { override def value: String = rawValue }
object JobEnvironment { def fromURL(url: URL): JobEnvironment = UrlEnvironment(url) def fromString(value: String): JobEnvironment = StringEnvironment(value) }