File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 11name : Release Docker
22on :
33 push :
4+ branches :
5+ - main
46 tags : ["*"]
57jobs :
68 publish :
Original file line number Diff line number Diff line change @@ -272,11 +272,28 @@ lazy val cli = project
272272 propsFile :: copiedJars.toList
273273 }
274274 .taskValue,
275- docker / imageNames :=
276- List (
277- ImageName (" sourcegraph/scip-java:latest" ),
278- ImageName (s " sourcegraph/scip-java: ${version.value}" )
279- ),
275+ docker / imageNames := {
276+ val latest = {
277+ val label =
278+ if (isSnapshot.value)
279+ " latest-snapshot"
280+ else
281+ " latest"
282+
283+ List (ImageName (s " sourcegraph/scip-java: $label" ))
284+ }
285+
286+ // Don't publish a separately tagged image for snapshots -
287+ // only latest-snapshot
288+ val versioned =
289+ if (isSnapshot.value)
290+ Nil
291+ else
292+ List (ImageName (s " sourcegraph/scip-java: ${version.value}" ))
293+
294+ latest ++ versioned
295+
296+ },
280297 docker / dockerfile := {
281298 val binaryDistribution = pack.value
282299 val scipJavaWrapper = (ThisBuild / baseDirectory).value / " bin" /
You can’t perform that action at this time.
0 commit comments