Skip to content

Commit 72a76e3

Browse files
authored
Use JIT bindings (#175)
A pilot usage of typesafegithub/github-workflows-kt#1318 Instead of using bundled action bindings, they're now fetched from a server that generates them on the fly.
1 parent 6f6b83d commit 72a76e3

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.github/workflows/build.main.kts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
#!/usr/bin/env kotlin
2+
@file:Repository("https://repo1.maven.org/maven2/")
23
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:1.13.0")
34

4-
import io.github.typesafegithub.workflows.actions.actions.CheckoutV4
5-
import io.github.typesafegithub.workflows.actions.actions.SetupJavaV4
6-
import io.github.typesafegithub.workflows.actions.gradle.GradleBuildActionV2
7-
import io.github.typesafegithub.workflows.actions.typesafegithub.GithubActionsTypingV1
5+
@file:Repository("https://github-workflows-kt-bindings.colman.com.br/binding/")
6+
@file:DependsOn("actions:checkout:v4")
7+
@file:DependsOn("actions:setup-java:v4")
8+
@file:DependsOn("gradle:gradle-build-action:v2")
9+
@file:DependsOn("typesafegithub:github-actions-typing:v1")
10+
11+
import io.github.typesafegithub.workflows.actions.actions.Checkout
12+
import io.github.typesafegithub.workflows.actions.actions.SetupJava
13+
import io.github.typesafegithub.workflows.actions.gradle.GradleBuildAction
14+
import io.github.typesafegithub.workflows.actions.typesafegithub.GithubActionsTyping
815
import io.github.typesafegithub.workflows.domain.RunnerType
916
import io.github.typesafegithub.workflows.domain.triggers.PullRequest
1017
import io.github.typesafegithub.workflows.domain.triggers.Push
@@ -23,8 +30,8 @@ workflow(
2330
id = "build",
2431
runsOn = RunnerType.UbuntuLatest,
2532
) {
26-
uses(action = CheckoutV4())
27-
uses(action = GradleBuildActionV2(arguments = "build"))
33+
uses(action = Checkout())
34+
uses(action = GradleBuildAction(arguments = "build"))
2835

2936
run(
3037
name = "Check if the produced files are committed correctly",
@@ -61,22 +68,22 @@ workflow(
6168
id = "validate-types",
6269
runsOn = RunnerType.UbuntuLatest,
6370
) {
64-
uses(action = CheckoutV4())
65-
uses(action = GithubActionsTypingV1())
71+
uses(action = Checkout())
72+
uses(action = GithubActionsTyping())
6673
}
6774

6875
job(
6976
id = "workflows_consistency_check",
7077
name = "Run consistency check on all GitHub workflows",
7178
runsOn = RunnerType.UbuntuLatest,
7279
) {
73-
uses(action = CheckoutV4())
80+
uses(action = Checkout())
7481
uses(
7582
name = "Set up Java in proper version",
76-
action = SetupJavaV4(
83+
action = SetupJava(
7784
javaVersion = "17",
78-
distribution = SetupJavaV4.Distribution.Zulu,
79-
cache = SetupJavaV4.BuildPlatform.Gradle,
85+
distribution = SetupJava.Distribution.Zulu,
86+
cache = SetupJava.BuildPlatform.Gradle,
8087
),
8188
)
8289
run(command = "cd .github/workflows")

0 commit comments

Comments
 (0)