Skip to content

Commit

Permalink
GITHUB_REF
Browse files Browse the repository at this point in the history
  • Loading branch information
mproch committed Jan 20, 2021
1 parent 95184c7 commit f3df13b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ lazy val dockerSettings = {

val updateLatest = if (dockerUpdateLatest.value) Some("latest") else None
val dockerVersion = Some(version.value)
val latestBranch = Some(git.gitCurrentBranch.value + "-latest")
//TODO: handle it more nicely
val currentBranch = propOrEnv("GITHUB_REF").map(_.replace("refs/heads/", "")).getOrElse(git.gitCurrentBranch.value)
val latestBranch = Some(currentBranch + "-latest")

List(dockerVersion, updateLatest, latestBranch, dockerTagName)
.map(tag => alias.withTag(tag.map(sanitize)))
Expand Down

0 comments on commit f3df13b

Please sign in to comment.