From 1520e8d6096304b5ad3a1e4de00015253710c9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Sun, 4 Aug 2024 04:40:49 +0200 Subject: [PATCH] Update github-workflows-kt version to 2.3.0 and Maven-based bindings --- .github/workflows/branches-and-prs.main.kts | 16 ++++++++++------ .github/workflows/codeql-analysis.main.kts | 19 +++++++++++-------- .github/workflows/common.main.kts | 3 ++- .github/workflows/docs-pr.main.kts | 14 +++++++++----- .../gradle-wrapper-validation.main.kts | 11 +++++++---- .github/workflows/release.main.kts | 17 ++++++++++------- 6 files changed, 49 insertions(+), 31 deletions(-) diff --git a/.github/workflows/branches-and-prs.main.kts b/.github/workflows/branches-and-prs.main.kts index 0d21351ef4..849dac6f68 100755 --- a/.github/workflows/branches-and-prs.main.kts +++ b/.github/workflows/branches-and-prs.main.kts @@ -17,9 +17,13 @@ */ @file:Import("common.main.kts") +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout:v4") +@file:DependsOn("codecov:codecov-action:v4") -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 -import io.github.typesafegithub.workflows.actions.codecov.CodecovActionV4 +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth +import io.github.typesafegithub.workflows.actions.codecov.CodecovAction import io.github.typesafegithub.workflows.domain.Concurrency import io.github.typesafegithub.workflows.domain.RunnerType import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest @@ -57,7 +61,7 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4() + action = Checkout() ) run( name = "Regenerate all workflow YAMLs and check for modifications", @@ -75,9 +79,9 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4( + action = Checkout( // Codecov needs fetch-depth > 1 - fetchDepth = CheckoutV4.FetchDepth.Value(2) + fetchDepth = FetchDepth.Value(2) ) ) uses( @@ -100,7 +104,7 @@ workflow( ) uses( name = "Upload to Codecov.io", - action = CodecovActionV4() + action = CodecovAction() ) } } diff --git a/.github/workflows/codeql-analysis.main.kts b/.github/workflows/codeql-analysis.main.kts index f03d00fa04..1c9e1e5562 100755 --- a/.github/workflows/codeql-analysis.main.kts +++ b/.github/workflows/codeql-analysis.main.kts @@ -17,10 +17,14 @@ */ @file:Import("common.main.kts") +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout:v4") +@file:DependsOn("github:codeql-action__analyze:v3") +@file:DependsOn("github:codeql-action__init:v3") -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 -import io.github.typesafegithub.workflows.actions.github.CodeqlActionAnalyzeV2 -import io.github.typesafegithub.workflows.actions.github.CodeqlActionInitV2 +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.github.CodeqlActionAnalyze +import io.github.typesafegithub.workflows.actions.github.CodeqlActionInit import io.github.typesafegithub.workflows.domain.Concurrency import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest import io.github.typesafegithub.workflows.domain.triggers.Cron @@ -71,7 +75,7 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4() + action = Checkout() ) // Manually added: Install and setup JDK uses( @@ -81,8 +85,7 @@ workflow( // Initializes the CodeQL tools for scanning uses( name = "Initialize CodeQL", - action = CodeqlActionInitV2( - _customVersion = "v3" + action = CodeqlActionInit( // Override language selection by uncommenting this and choosing your languages // languages = listOf("go", "javascript", "csharp", "python", "cpp", "java"), ) @@ -91,7 +94,7 @@ workflow( // If this step fails, then you should remove it and run the build manually (see below). // uses( // name = "Autobuild", - // action = CodeqlActionAutobuildV2() + // action = CodeqlActionAutobuild() // ) // // ℹ️ Command-line programs to run using the OS shell. @@ -123,7 +126,7 @@ workflow( ) uses( name = "Perform CodeQL Analysis", - action = CodeqlActionAnalyzeV2(_customVersion = "v3") + action = CodeqlActionAnalyze() ) } } diff --git a/.github/workflows/common.main.kts b/.github/workflows/common.main.kts index bc1058b04a..6bbb90052d 100755 --- a/.github/workflows/common.main.kts +++ b/.github/workflows/common.main.kts @@ -16,7 +16,8 @@ * limitations under the License. */ -@file:DependsOn("io.github.typesafegithub:github-workflows-kt:2.0.0") +@file:Repository("https://repo.maven.apache.org/maven2/") +@file:DependsOn("io.github.typesafegithub:github-workflows-kt:2.3.0") import io.github.typesafegithub.workflows.domain.Job import io.github.typesafegithub.workflows.domain.JobOutputs.EMPTY diff --git a/.github/workflows/docs-pr.main.kts b/.github/workflows/docs-pr.main.kts index 5cdab7973f..1334f7566f 100755 --- a/.github/workflows/docs-pr.main.kts +++ b/.github/workflows/docs-pr.main.kts @@ -17,9 +17,13 @@ */ @file:Import("common.main.kts") +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout:v4") +@file:DependsOn("actions:upload-artifact:v4") -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 -import io.github.typesafegithub.workflows.actions.actions.UploadArtifactV4 +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth +import io.github.typesafegithub.workflows.actions.actions.UploadArtifact import io.github.typesafegithub.workflows.domain.Concurrency import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest import io.github.typesafegithub.workflows.domain.triggers.MergeGroup @@ -56,8 +60,8 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4( - fetchDepth = CheckoutV4.FetchDepth.Value(1) + action = Checkout( + fetchDepth = FetchDepth.Value(1) ) ) uses( @@ -83,7 +87,7 @@ workflow( ) uses( name = "Archive and upload docs", - action = UploadArtifactV4( + action = UploadArtifact( name = "docs", path = listOf( "build/docs/**", diff --git a/.github/workflows/gradle-wrapper-validation.main.kts b/.github/workflows/gradle-wrapper-validation.main.kts index fea0eaac0a..52a2718f50 100755 --- a/.github/workflows/gradle-wrapper-validation.main.kts +++ b/.github/workflows/gradle-wrapper-validation.main.kts @@ -17,9 +17,12 @@ */ @file:Import("common.main.kts") +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout:v4") +@file:DependsOn("gradle:wrapper-validation-action:v3") -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 -import io.github.typesafegithub.workflows.actions.gradle.WrapperValidationActionV2 +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.gradle.WrapperValidationAction import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest import io.github.typesafegithub.workflows.domain.triggers.MergeGroup import io.github.typesafegithub.workflows.domain.triggers.PullRequest @@ -43,11 +46,11 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4() + action = Checkout() ) uses( name = "Validate Wrapper", - action = WrapperValidationActionV2(_customVersion = "v3") + action = WrapperValidationAction() ) } } diff --git a/.github/workflows/release.main.kts b/.github/workflows/release.main.kts index d660ffaa95..d3e052a9bf 100755 --- a/.github/workflows/release.main.kts +++ b/.github/workflows/release.main.kts @@ -17,10 +17,13 @@ */ @file:Import("common.main.kts") +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout:v4") +@file:DependsOn("codecov:codecov-action:v4") -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4.FetchDepth -import io.github.typesafegithub.workflows.actions.codecov.CodecovActionV4 +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth +import io.github.typesafegithub.workflows.actions.codecov.CodecovAction import io.github.typesafegithub.workflows.domain.RunnerType import io.github.typesafegithub.workflows.domain.triggers.Push import io.github.typesafegithub.workflows.dsl.expressions.Contexts.github @@ -55,7 +58,7 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4( + action = Checkout( // Codecov needs fetch-depth > 1 fetchDepth = FetchDepth.Value(2) ) @@ -84,7 +87,7 @@ workflow( ) uses( name = "Upload to Codecov.io", - action = CodecovActionV4() + action = CodecovAction() ) } val releaseSpock = job( @@ -102,7 +105,7 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4() + action = Checkout() ) uses( name = "Set up JDKs", @@ -144,7 +147,7 @@ workflow( ) { uses( name = "Checkout Repository", - action = CheckoutV4() + action = Checkout() ) uses( name = "Set up JDKs",