@@ -10,8 +10,10 @@ import io.github.typesafegithub.workflows.actions.actions.Checkout
1010import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle
1111import io.github.typesafegithub.workflows.annotations.ExperimentalKotlinLogicStep
1212import io.github.typesafegithub.workflows.domain.Environment
13+ import io.github.typesafegithub.workflows.domain.JobOutputs
1314import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
1415import io.github.typesafegithub.workflows.domain.triggers.*
16+ import io.github.typesafegithub.workflows.dsl.JobBuilder
1517import io.github.typesafegithub.workflows.dsl.expressions.Contexts
1618import io.github.typesafegithub.workflows.dsl.expressions.expr
1719import io.github.typesafegithub.workflows.dsl.workflow
@@ -77,6 +79,8 @@ workflow(
7779 }
7880 }
7981
82+ cleanMavenLocal()
83+
8084 run (
8185 name = " Execute the script using the bindings from the serve - with /binding" ,
8286 command = """
@@ -85,6 +89,8 @@ workflow(
8589 """ .trimIndent(),
8690 )
8791
92+ cleanMavenLocal()
93+
8894 run (
8995 name = " Execute the script using the bindings from the server" ,
9096 command = """
@@ -93,10 +99,7 @@ workflow(
9399 """ .trimIndent(),
94100 )
95101
96- run (
97- name = " Clean Maven Local to fetch required POMs again" ,
98- command = " rm -rf ~/.m2/repository/"
99- )
102+ cleanMavenLocal()
100103
101104 run (
102105 name = " Execute the script using bindings but without dependency on library" ,
@@ -149,3 +152,10 @@ workflow(
149152 )
150153 }
151154}
155+
156+ fun JobBuilder<JobOutputs.EMPTY>.cleanMavenLocal () {
157+ run (
158+ name = " Clean Maven Local to fetch required POMs again" ,
159+ command = " rm -rf ~/.m2/repository/"
160+ )
161+ }
0 commit comments