Skip to content

Commit

Permalink
Getting a new tag from COMMIT_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
TonioGela committed Aug 30, 2023
1 parent 16e5491 commit 4170f04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ lazy val root = (project in file("."))
Docker / version := (ThisBuild / version).value.replaceAll("-SNAPSHOT", "-latest").toLowerCase,
Docker / packageName := s"${name.value}",
Docker / dockerExposedPorts := Seq(8080),
Docker / dockerAliases := Seq(
dockerAlias.value,
Option(System.getenv("COMMIT_SHA")).fold(dockerAlias.value)(t => dockerAlias.value.withTag(Some(t)))
).distinct,
libraryDependencies := Dependencies.Jars.`server`,
Docker / maintainer := "https://pagopa.it",
dockerCommands += Cmd("LABEL", s"org.opencontainers.image.source https://github.com/pagopa/${name.value}")
Expand Down

0 comments on commit 4170f04

Please sign in to comment.