Skip to content

Commit 2db4303

Browse files
authored
Fix typesafe workflows (#2299)
- Update github-workflows-kt to 3.7.0 to align with updated dependencies - Update dependency actions:upload-artifact___major to v6 The main issue was that both `codecov-action` and `codeql-action` switched to `_Untyped`. This breaking change seems to be an inherent problem with "typesafegithub": it can't use two versions for semantic versioning, one for the action it represents, and an internal one for its own api.
1 parent 1edf452 commit 2db4303

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

.github/workflows/branches-and-prs.main.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
@file:Repository("https://repo.maven.apache.org/maven2/")
2222
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
23-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
23+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout___major:[v5,v6-alpha)")
26+
@file:DependsOn("actions:checkout___major:[v6,v7-alpha)")
2727
@file:DependsOn("codecov:codecov-action___major:[v5,v6-alpha)")
2828

2929
import io.github.typesafegithub.workflows.actions.actions.Checkout
3030
import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth
31-
import io.github.typesafegithub.workflows.actions.codecov.CodecovAction
31+
import io.github.typesafegithub.workflows.actions.codecov.CodecovAction_Untyped
3232
import io.github.typesafegithub.workflows.domain.Concurrency
3333
import io.github.typesafegithub.workflows.domain.RunnerType
3434
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
@@ -127,8 +127,8 @@ workflow(
127127
)
128128
uses(
129129
name = "Upload to Codecov.io",
130-
action = CodecovAction(
131-
failCiIfError = true
130+
action = CodecovAction_Untyped(
131+
failCiIfError_Untyped = "true"
132132
)
133133
)
134134
}

.github/workflows/branches-and-prs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- id: 'step-0'
3737
name: 'Checkout Repository'
38-
uses: 'actions/checkout@v5'
38+
uses: 'actions/checkout@v6'
3939
- id: 'step-1'
4040
name: 'Regenerate all Workflow YAMLs'
4141
run: 'find .github/workflows -mindepth 1 -maxdepth 1 -name ''*.main.kts'' -exec {} \;'
@@ -106,7 +106,7 @@ jobs:
106106
steps:
107107
- id: 'step-0'
108108
name: 'Checkout Repository'
109-
uses: 'actions/checkout@v5'
109+
uses: 'actions/checkout@v6'
110110
with:
111111
fetch-depth: '2'
112112
- id: 'step-1'

.github/workflows/codeql-analysis.main.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020

2121
@file:Repository("https://repo.maven.apache.org/maven2/")
2222
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
23-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
23+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout___major:[v5,v6-alpha)")
27-
@file:DependsOn("github:codeql-action__analyze___major:v4")
28-
@file:DependsOn("github:codeql-action__init___major:v4")
26+
@file:DependsOn("actions:checkout___major:[v6,v7-alpha)")
27+
@file:DependsOn("github:codeql-action__analyze___major:[v4.32.4,v5-alpha)")
28+
@file:DependsOn("github:codeql-action__init___major:[v4.32.4,v5-alpha)")
2929

3030
import io.github.typesafegithub.workflows.actions.actions.Checkout
31-
import io.github.typesafegithub.workflows.actions.github.CodeqlActionAnalyze
32-
import io.github.typesafegithub.workflows.actions.github.CodeqlActionInit
31+
import io.github.typesafegithub.workflows.actions.github.CodeqlActionAnalyze_Untyped
32+
import io.github.typesafegithub.workflows.actions.github.CodeqlActionInit_Untyped
3333
import io.github.typesafegithub.workflows.domain.Concurrency
3434
import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest
3535
import io.github.typesafegithub.workflows.domain.triggers.*
@@ -85,7 +85,7 @@ workflow(
8585
// Initializes the CodeQL tools for scanning
8686
uses(
8787
name = "Initialize CodeQL",
88-
action = CodeqlActionInit(
88+
action = CodeqlActionInit_Untyped(
8989
// Override language selection by uncommenting this and choosing your languages
9090
// languages = listOf("go", "javascript", "csharp", "python", "cpp", "java"),
9191
)
@@ -127,7 +127,7 @@ workflow(
127127
)
128128
uses(
129129
name = "Perform CodeQL Analysis",
130-
action = CodeqlActionAnalyze()
130+
action = CodeqlActionAnalyze_Untyped()
131131
)
132132
}
133133
}

.github/workflows/codeql-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
steps:
4545
- id: 'step-0'
4646
name: 'Checkout Repository'
47-
uses: 'actions/checkout@v5'
47+
uses: 'actions/checkout@v6'
4848
- id: 'step-1'
4949
name: 'Set up JDKs'
5050
uses: './.github/actions/setup-build-env'

.github/workflows/common.main.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
@file:Repository("https://repo.maven.apache.org/maven2/")
20-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
20+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
2121

2222
import io.github.typesafegithub.workflows.domain.Job
2323
import io.github.typesafegithub.workflows.domain.JobOutputs.EMPTY

.github/workflows/docs-pr.main.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
@file:Repository("https://repo.maven.apache.org/maven2/")
2222
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
23-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
23+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout___major:[v5,v6-alpha)")
27-
@file:DependsOn("actions:upload-artifact___major:[v5,v6-alpha)")
26+
@file:DependsOn("actions:checkout___major:[v6,v7-alpha)")
27+
@file:DependsOn("actions:upload-artifact___major:[v5,7.0)")
2828

2929
import io.github.typesafegithub.workflows.actions.actions.Checkout
3030
import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth

.github/workflows/docs-pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- id: 'step-0'
3737
name: 'Checkout Repository'
38-
uses: 'actions/checkout@v5'
38+
uses: 'actions/checkout@v6'
3939
with:
4040
fetch-depth: '1'
4141
- id: 'step-1'
@@ -51,7 +51,7 @@ jobs:
5151
run: './gradlew --stacktrace asciidoctor javadoc "-Dvariant=5.0" "-DjavaVersion=25"'
5252
- id: 'step-4'
5353
name: 'Archive and upload docs'
54-
uses: 'actions/upload-artifact@v5'
54+
uses: 'actions/upload-artifact@v6'
5555
with:
5656
name: 'docs'
5757
path: |-

.github/workflows/release.main.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
@file:Repository("https://repo.maven.apache.org/maven2/")
2222
// work-around for https://youtrack.jetbrains.com/issue/KT-69145
23-
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.6.0")
23+
@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.7.0")
2424

2525
@file:Repository("https://bindings.krzeminski.it/")
26-
@file:DependsOn("actions:checkout___major:[v5,v6-alpha)")
26+
@file:DependsOn("actions:checkout___major:[v6,v7-alpha)")
2727
@file:DependsOn("codecov:codecov-action___major:[v5,v6-alpha)")
2828

2929
import io.github.typesafegithub.workflows.actions.actions.Checkout
3030
import io.github.typesafegithub.workflows.actions.actions.Checkout.FetchDepth
31-
import io.github.typesafegithub.workflows.actions.codecov.CodecovAction
31+
import io.github.typesafegithub.workflows.actions.codecov.CodecovAction_Untyped
3232
import io.github.typesafegithub.workflows.domain.RunnerType
3333
import io.github.typesafegithub.workflows.domain.triggers.Push
3434
import io.github.typesafegithub.workflows.dsl.expressions.Contexts.github
@@ -103,8 +103,8 @@ workflow(
103103
)
104104
uses(
105105
name = "Upload to Codecov.io",
106-
action = CodecovAction(
107-
failCiIfError = true
106+
action = CodecovAction_Untyped(
107+
failCiIfError_Untyped = "true"
108108
)
109109
)
110110
}

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
steps:
8787
- id: 'step-0'
8888
name: 'Checkout Repository'
89-
uses: 'actions/checkout@v5'
89+
uses: 'actions/checkout@v6'
9090
with:
9191
fetch-depth: '2'
9292
- id: 'step-1'
@@ -131,7 +131,7 @@ jobs:
131131
steps:
132132
- id: 'step-0'
133133
name: 'Checkout Repository'
134-
uses: 'actions/checkout@v5'
134+
uses: 'actions/checkout@v6'
135135
- id: 'step-1'
136136
name: 'Set up JDKs'
137137
uses: './.github/actions/setup-build-env'
@@ -163,7 +163,7 @@ jobs:
163163
steps:
164164
- id: 'step-0'
165165
name: 'Checkout Repository'
166-
uses: 'actions/checkout@v5'
166+
uses: 'actions/checkout@v6'
167167
- id: 'step-1'
168168
name: 'Set up JDKs'
169169
uses: './.github/actions/setup-build-env'

0 commit comments

Comments
 (0)