|
1 | 1 | package io.github.typesafegithub.workflows.yaml |
2 | 2 |
|
3 | | -import io.github.typesafegithub.workflows.actions.actions.CheckoutV4 |
4 | 3 | import io.github.typesafegithub.workflows.domain.Job |
5 | 4 | import io.github.typesafegithub.workflows.domain.KotlinLogicStep |
6 | 5 | import io.github.typesafegithub.workflows.domain.Mode |
7 | 6 | import io.github.typesafegithub.workflows.domain.Permission |
8 | 7 | import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest |
9 | 8 | import io.github.typesafegithub.workflows.domain.Workflow |
| 9 | +import io.github.typesafegithub.workflows.domain.actions.CustomAction |
10 | 10 | import io.github.typesafegithub.workflows.domain.contexts.Contexts |
11 | 11 | import io.github.typesafegithub.workflows.domain.contexts.GithubContext |
12 | 12 | import io.github.typesafegithub.workflows.dsl.toBuilder |
@@ -160,7 +160,18 @@ private fun Workflow.generateYaml( |
160 | 160 | condition = yamlConsistencyJobCondition, |
161 | 161 | env = yamlConsistencyJobEnv, |
162 | 162 | ) { |
163 | | - uses(name = "Check out", action = CheckoutV4()) |
| 163 | + uses( |
| 164 | + name = "Check out", |
| 165 | + // Since this action is used in a simple way, and we actually don't want to update the version |
| 166 | + // because it causes YAML regeneration, let's not use the type-safe binding here. It will also |
| 167 | + // let us avoid depending on a Maven-based action binding once bundled bindings are deprecated. |
| 168 | + action = |
| 169 | + CustomAction( |
| 170 | + actionOwner = "actions", |
| 171 | + actionName = "checkout", |
| 172 | + actionVersion = "v4", |
| 173 | + ), |
| 174 | + ) |
164 | 175 |
|
165 | 176 | yamlConsistencyJobAdditionalSteps?.also { block -> |
166 | 177 | block() |
|
0 commit comments