Skip to content

Commit

Permalink
Added ComputePrependPATH for dynamically modifying PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Nov 16, 2020
1 parent 1b17887 commit 4a45b10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/scala/sbtghactions/WorkflowStep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ object WorkflowStep {
List("echo \"" + name + "=$(" + cmd + ")\" >> $GITHUB_ENV"),
name = Some(s"Export $name"))

def ComputePrependPATH(cmd: String): WorkflowStep =
Run(
List("echo \"$(" + cmd + ")\" >> $GITHUB_PATH"),
name = Some(s"Prepend $$PATH using $cmd"))

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
final case class Use(owner: String, repo: String, ref: String, params: Map[String, String] = Map(), 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 4a45b10

Please sign in to comment.