Skip to content

Commit a7c8202

Browse files
krzema12Vampire
authored andcommitted
Update github-workflows-kt to 2.0.0
1 parent 130e9cb commit a7c8202

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/workflow-with-copyright.main.kts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,29 @@
1414
* limitations under the License.
1515
*/
1616

17-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:1.14.0")
17+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:2.0.0")
1818

1919
import io.github.typesafegithub.workflows.domain.Concurrency
2020
import io.github.typesafegithub.workflows.domain.triggers.Trigger
2121
import io.github.typesafegithub.workflows.dsl.WorkflowBuilder
2222
import io.github.typesafegithub.workflows.dsl.workflow
2323
import io.github.typesafegithub.workflows.yaml.Preamble.WithOriginalAfter
24-
import io.github.typesafegithub.workflows.yaml.writeToFile
2524
import java.io.File
2625

2726
fun workflowWithCopyright(
2827
name: String,
2928
on: List<Trigger>,
30-
env: LinkedHashMap<String, String> = linkedMapOf(),
29+
env: Map<String, String> = mapOf(),
3130
sourceFile: File,
3231
concurrency: Concurrency? = null,
3332
block: WorkflowBuilder.() -> Unit
3433
) {
35-
val sourceFilePath = sourceFile.toPath()
3634
workflow(
3735
name = name,
3836
on = on,
3937
env = env,
40-
sourceFile = sourceFilePath,
38+
sourceFile = sourceFile,
4139
concurrency = concurrency,
42-
block = block
43-
).writeToFile(
4440
preamble = WithOriginalAfter(
4541
"""
4642
Copyright 2020-2023 Björn Kautler
@@ -57,6 +53,7 @@ fun workflowWithCopyright(
5753
See the License for the specific language governing permissions and
5854
limitations under the License.
5955
""".trimIndent()
60-
)
56+
),
57+
block = block
6158
)
6259
}

0 commit comments

Comments
 (0)