-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdetekt.main.kts
More file actions
executable file
·32 lines (26 loc) · 1.21 KB
/
detekt.main.kts
File metadata and controls
executable file
·32 lines (26 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env kotlin
@file:Repository("https://repo1.maven.org/maven2/")
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
@file:Repository("https://bindings.krzeminski.it")
@file:DependsOn("actions:checkout:v5")
@file:DependsOn("actions:setup-java:v5")
@file:DependsOn("gradle:actions__setup-gradle:v5")
import io.github.typesafegithub.workflows.actions.actions.Checkout
import io.github.typesafegithub.workflows.actions.actions.SetupJava
import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle
import io.github.typesafegithub.workflows.domain.RunnerType
import io.github.typesafegithub.workflows.domain.triggers.PullRequest
import io.github.typesafegithub.workflows.domain.triggers.Push
import io.github.typesafegithub.workflows.dsl.workflow
workflow(
name = "Detekt",
on = listOf(Push(), PullRequest()),
sourceFile = __FILE__
) {
job(id = "detekt", runsOn = RunnerType.UbuntuLatest) {
uses(name = "Setup JDK", action = SetupJava(javaVersion = "22", distribution = SetupJava.Distribution.Adopt))
uses(name = "Checkout", action = Checkout())
uses(name = "Setup Gradle", action = ActionsSetupGradle())
run(name = "Run Detekt", command = "./gradlew detektAll")
}
}