Skip to content

Commit 65b2e8b

Browse files
authored
chore(ci): use actions/checkout's version in consistency check jobs from classpath (#2175)
Thanks to this, Renovate will be able to bump actions/checkout's version without any manual action or not bumping the version in the consistency check job.
1 parent df40dfc commit 65b2e8b

File tree

9 files changed

+14
-5
lines changed

9 files changed

+14
-5
lines changed

.github/workflows/bindings-server.main.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import io.github.typesafegithub.workflows.dsl.JobBuilder
1919
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2020
import io.github.typesafegithub.workflows.dsl.expressions.expr
2121
import io.github.typesafegithub.workflows.dsl.workflow
22+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2223
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2324
import java.net.URI
2425
import java.net.ConnectException
@@ -43,6 +44,7 @@ workflow(
4344
),
4445
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
4546
useLocalBindingsServerAsFallback = true,
47+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
4648
),
4749
sourceFile = __FILE__,
4850
) {

.github/workflows/bindings-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- id: 'step-0'
2020
name: 'Check out'
21-
uses: 'actions/checkout@v4'
21+
uses: 'actions/checkout@v5'
2222
- id: 'step-1'
2323
name: 'Execute script'
2424
continue-on-error: true

.github/workflows/build.main.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import io.github.typesafegithub.workflows.domain.triggers.Push
2222
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2323
import io.github.typesafegithub.workflows.dsl.expressions.expr
2424
import io.github.typesafegithub.workflows.dsl.workflow
25+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2526
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2627

2728
val GRADLE_ENCRYPTION_KEY by Contexts.secrets
@@ -34,6 +35,7 @@ workflow(
3435
),
3536
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
3637
useLocalBindingsServerAsFallback = true,
38+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
3739
),
3840
sourceFile = __FILE__,
3941
) {

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- id: 'step-0'
1717
name: 'Check out'
18-
uses: 'actions/checkout@v4'
18+
uses: 'actions/checkout@v5'
1919
- id: 'step-1'
2020
name: 'Execute script'
2121
continue-on-error: true

.github/workflows/end-to-end-tests-2nd-workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- id: 'step-0'
1717
name: 'Check out'
18-
uses: 'actions/checkout@v4'
18+
uses: 'actions/checkout@v5'
1919
- id: 'step-1'
2020
name: 'Set up JDK'
2121
uses: 'actions/setup-java@v5'

.github/workflows/end-to-end-tests.main.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import io.github.typesafegithub.workflows.dsl.JobBuilder
2828
import io.github.typesafegithub.workflows.dsl.expressions.Contexts
2929
import io.github.typesafegithub.workflows.dsl.expressions.expr
3030
import io.github.typesafegithub.workflows.dsl.workflow
31+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
3132
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
3233
import io.github.typesafegithub.workflows.updates.reportAvailableUpdates
3334
import java.time.Instant
@@ -51,6 +52,7 @@ workflow(
5152
env = mapOf(
5253
"GITHUB_TOKEN" to expr("secrets.GITHUB_TOKEN")
5354
),
55+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
5456
additionalSteps = {
5557
publishToMavenLocal()
5658
},
@@ -290,6 +292,7 @@ workflow(
290292
PullRequest(),
291293
),
292294
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
295+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
293296
additionalSteps = {
294297
publishToMavenLocal()
295298
},

.github/workflows/end-to-end-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- id: 'step-0'
1919
name: 'Check out'
20-
uses: 'actions/checkout@v4'
20+
uses: 'actions/checkout@v5'
2121
- id: 'step-1'
2222
name: 'Set up JDK'
2323
uses: 'actions/setup-java@v5'

.github/workflows/release.main.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ import io.github.typesafegithub.workflows.domain.triggers.Push
1919
import io.github.typesafegithub.workflows.dsl.JobBuilder
2020
import io.github.typesafegithub.workflows.dsl.expressions.expr
2121
import io.github.typesafegithub.workflows.dsl.workflow
22+
import io.github.typesafegithub.workflows.yaml.CheckoutActionVersionSource
2223
import io.github.typesafegithub.workflows.yaml.DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG
2324

2425
workflow(
2526
name = "Release",
2627
on = listOf(Push(tags = listOf("v*.*.*"))),
2728
consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(
2829
useLocalBindingsServerAsFallback = true,
30+
checkoutActionVersion = CheckoutActionVersionSource.InferFromClasspath(),
2931
),
3032
sourceFile = __FILE__,
3133
env = mapOf(

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- id: 'step-0'
2121
name: 'Check out'
22-
uses: 'actions/checkout@v4'
22+
uses: 'actions/checkout@v5'
2323
- id: 'step-1'
2424
name: 'Execute script'
2525
continue-on-error: true

0 commit comments

Comments
 (0)