@@ -19,7 +19,9 @@ import java.net.http.HttpResponse.BodyHandlers
1919import kotlin.time.Duration.Companion.minutes
2020import kotlin.time.TimeSource
2121
22- val GRADLE_ENCRYPTION_KEY by Contexts .secrets
22+ val DOCKERHUB_USERNAME by Contexts .secrets
23+ val DOCKERHUB_PASSWORD by Contexts .secrets
24+ val TRIGGER_IMAGE_PULL by Contexts .secrets
2325
2426@OptIn(ExperimentalKotlinLogicStep ::class )
2527workflow(
@@ -81,10 +83,23 @@ workflow(
8183 runsOn = UbuntuLatest ,
8284 `if ` = expr { " ${github.event_name} == 'push'" },
8385 needs = listOf (endToEndTest),
86+ env = linkedMapOf(
87+ " DOCKERHUB_USERNAME" to expr { DOCKERHUB_USERNAME },
88+ " DOCKERHUB_PASSWORD" to expr { DOCKERHUB_PASSWORD },
89+ ),
8490 _customArguments = mapOf (
8591 " environment" to " DockerHub" ,
8692 )
8793 ) {
88- run (command = " echo TODO" )
94+ uses(action = CheckoutV4 ())
95+ uses(action = ActionsSetupGradleV3 ())
96+ run (
97+ name = " Build and publish image" ,
98+ command = " ./gradlew :jit-binding-server:publishImage" ,
99+ )
100+ run (
101+ name = " Use newest image on the server" ,
102+ command = " curl -X POST ${expr { TRIGGER_IMAGE_PULL }} --insecure" ,
103+ )
89104 }
90105}.writeToFile()
0 commit comments