Skip to content

Commit

Permalink
Use newest versions of actions
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 authored and Vampire committed Apr 18, 2024
1 parent 319454a commit 130e9cb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/test.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

@file:Import("workflow-with-copyright.main.kts")

import io.github.typesafegithub.workflows.actions.actions.CacheRestoreV3
import io.github.typesafegithub.workflows.actions.actions.CacheSaveV3
import io.github.typesafegithub.workflows.actions.actions.CheckoutV3
import io.github.typesafegithub.workflows.actions.actions.SetupJavaV3
import io.github.typesafegithub.workflows.actions.actions.SetupJavaV3.Distribution.Temurin
import io.github.typesafegithub.workflows.actions.actions.CacheRestoreV4
import io.github.typesafegithub.workflows.actions.actions.CacheSaveV4
import io.github.typesafegithub.workflows.actions.actions.CheckoutV4
import io.github.typesafegithub.workflows.actions.actions.SetupJavaV4
import io.github.typesafegithub.workflows.actions.actions.SetupJavaV4.Distribution.Temurin
import io.github.typesafegithub.workflows.actions.burrunan.GradleCacheActionV1
import io.github.typesafegithub.workflows.actions.vampire.SetupWslV1
import io.github.typesafegithub.workflows.actions.vampire.SetupWslV1.Distribution
import io.github.typesafegithub.workflows.actions.vampire.SetupWslV3
import io.github.typesafegithub.workflows.actions.vampire.SetupWslV3.Distribution
import io.github.typesafegithub.workflows.domain.CommandStep
import io.github.typesafegithub.workflows.domain.ActionStep
import io.github.typesafegithub.workflows.domain.JobOutputs.EMPTY
Expand Down Expand Up @@ -122,7 +122,7 @@ val wslBash = Shell.Custom("wsl-bash {0}")

val wslSh = Shell.Custom("wsl-sh {0}")

lateinit var executeActionStep: ActionStep<SetupWslV1.Outputs>
lateinit var executeActionStep: ActionStep<SetupWslV3.Outputs>

workflowWithCopyright(
name = "Build and Test",
Expand All @@ -138,7 +138,7 @@ workflowWithCopyright(
"build/distributions/"
)

val executeAction = SetupWslV1(
val executeAction = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distribution.user-id"))
)

Expand All @@ -153,11 +153,11 @@ workflowWithCopyright(
)
uses(
name = "Checkout",
action = CheckoutV3()
action = CheckoutV4()
)
uses(
name = "Setup Java 11",
action = SetupJavaV3(
action = SetupJavaV4(
javaVersion = "11",
distribution = Temurin
)
Expand All @@ -178,7 +178,7 @@ workflowWithCopyright(
)
uses(
name = "Save built artifacts to cache",
action = CacheSaveV3(
action = CacheSaveV4(
path = builtArtifacts,
key = expr { github.run_id }
)
Expand All @@ -199,7 +199,7 @@ workflowWithCopyright(
) {
uses(
name = "Restore built artifacts from cache",
action = CacheRestoreV3(
action = CacheRestoreV4(
path = builtArtifacts,
key = expr { github.run_id },
failOnCacheMiss = true
Expand Down Expand Up @@ -259,7 +259,7 @@ workflowWithCopyright(
)
) {
executeActionStep = usesSelf(
action = SetupWslV1(
action = SetupWslV3(
update = true
)
)
Expand Down Expand Up @@ -678,26 +678,26 @@ workflowWithCopyright(
) {
usesSelf(
name = "Execute action for ${expr("matrix.distributions.distribution1.user-id")}",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distributions.distribution1.user-id"))
)
)
usesSelf(
name = "Execute action for ${expr("matrix.distributions.distribution2.user-id")}",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distributions.distribution2.user-id"))
)
)
usesSelf(
name = "Execute action for ${expr("matrix.distributions.distribution3.user-id")}",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distributions.distribution3.user-id")),
setAsDefault = false
)
)
executeActionStep = usesSelf(
name = "Execute action for ${expr("matrix.distributions.distribution1.user-id")} again",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distributions.distribution1.user-id"))
)
)
Expand Down Expand Up @@ -771,7 +771,7 @@ workflowWithCopyright(
)
executeActionStep = usesSelfAfterSuccess(
name = "Execute action for ${expr("matrix.distribution2.user-id")}",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distribution2.user-id"))
)
)
Expand Down Expand Up @@ -826,7 +826,7 @@ workflowWithCopyright(
.associateWith {
usesSelf(
name = "Execute action for ${expr("matrix.distributions.distribution$it.user-id")}",
action = SetupWslV1(
action = SetupWslV3(
distribution = Distribution.Custom(expr("matrix.distributions.distribution$it.user-id")),
additionalPackages = if (it == 2) listOf("bash") else null,
setAsDefault = if (it >= 3) false else null
Expand Down Expand Up @@ -918,7 +918,7 @@ fun JobBuilder<*>.commonTests() {

fun JobBuilder<*>.usesSelfAfterSuccess(
name: String = "Execute action",
action: SetupWslV1
action: SetupWslV3
) = usesSelf(
name = name,
action = action,
Expand All @@ -927,7 +927,7 @@ fun JobBuilder<*>.usesSelfAfterSuccess(

fun JobBuilder<*>.usesSelf(
name: String = "Execute action",
action: SetupWslV1,
action: SetupWslV3,
condition: String? = null,
continueOnError: Boolean? = null
) = uses(
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
run: 'git config --global core.autocrlf input'
- id: 'step-1'
name: 'Checkout'
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'
- id: 'step-2'
name: 'Setup Java 11'
uses: 'actions/setup-java@v3'
uses: 'actions/setup-java@v4'
with:
java-version: '11'
distribution: 'temurin'
Expand All @@ -68,7 +68,7 @@ jobs:
--scan
- id: 'step-4'
name: 'Save built artifacts to cache'
uses: 'actions/cache/save@v3'
uses: 'actions/cache/save@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -851,7 +851,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -947,7 +947,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -1076,7 +1076,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -1210,7 +1210,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -1374,7 +1374,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down Expand Up @@ -1536,7 +1536,7 @@ jobs:
steps:
- id: 'step-0'
name: 'Restore built artifacts from cache'
uses: 'actions/cache/restore@v3'
uses: 'actions/cache/restore@v4'
with:
path: |-
action.yml
Expand Down

0 comments on commit 130e9cb

Please sign in to comment.