Skip to content

Commit

Permalink
Publish a latest-snapshot docker image from main (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
keynmol authored May 16, 2023
1 parent b1386d2 commit 98aad2d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Release Docker
on:
push:
branches:
- main
tags: ["*"]
jobs:
publish:
Expand Down
27 changes: 22 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,28 @@ lazy val cli = project
propsFile :: copiedJars.toList
}
.taskValue,
docker / imageNames :=
List(
ImageName("sourcegraph/scip-java:latest"),
ImageName(s"sourcegraph/scip-java:${version.value}")
),
docker / imageNames := {
val latest = {
val label =
if (isSnapshot.value)
"latest-snapshot"
else
"latest"

List(ImageName(s"sourcegraph/scip-java:$label"))
}

// Don't publish a separately tagged image for snapshots -
// only latest-snapshot
val versioned =
if (isSnapshot.value)
Nil
else
List(ImageName(s"sourcegraph/scip-java:${version.value}"))

latest ++ versioned

},
docker / dockerfile := {
val binaryDistribution = pack.value
val scipJavaWrapper = (ThisBuild / baseDirectory).value / "bin" /
Expand Down

0 comments on commit 98aad2d

Please sign in to comment.