Skip to content

Commit

Permalink
Replaced ComputeVar implementation with the new variant
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Nov 16, 2020
1 parent 4e7d46f commit 1b17887
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/sbtghactions/WorkflowStep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ object WorkflowStep {
val Tmate: WorkflowStep = Use("mxschmitt", "action-tmate", "v2", name = Some("Setup tmate session"))

def ComputeVar(name: String, cmd: String): WorkflowStep =
Run(List(s"echo ::set-env name=$name::$$($cmd)"), name = Some(s"Export $name"))
Run(
List("echo \"" + name + "=$(" + cmd + ")\" >> $GITHUB_ENV"),
name = Some(s"Export $name"))

final case class Run(commands: List[String], id: Option[String] = None, name: Option[String] = None, cond: Option[String] = None, env: Map[String, String] = Map()) extends WorkflowStep
final case class Sbt(commands: List[String], id: Option[String] = None, name: Option[String] = None, cond: Option[String] = None, env: Map[String, String] = Map()) extends WorkflowStep
Expand Down

0 comments on commit 1b17887

Please sign in to comment.