diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 252ff31afc..31c78e0384 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,8 @@ jobs: cache: sbt - uses: coursier/setup-action@v1 + with: + apps: sbt - name: Check formatting if: matrix.scala == '2.13.14' @@ -90,6 +92,8 @@ jobs: run: sbt '++ ${{ matrix.scala }}' test - uses: coursier/setup-action@v1 + with: + apps: sbt - name: Check doc generation if: ${{ github.event_name == 'pull_request' }} @@ -238,6 +242,8 @@ jobs: fetch-depth: 0 - uses: coursier/setup-action@v1 + with: + apps: sbt - name: Setup Java (temurin@21) if: matrix.java == 'temurin@21' diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index f8bc4e9ef6..25ebc0a314 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -24,6 +24,8 @@ jobs: with: fetch-depth: '0' - uses: coursier/setup-action@v1 + with: + apps: 'sbt' - name: Setup Scala uses: actions/setup-java@v3.9.0 with: @@ -50,6 +52,8 @@ jobs: java-version: 17 check-latest: true - uses: coursier/setup-action@v1 + with: + apps: 'sbt' - name: Setup NodeJs uses: actions/setup-node@v3 with: @@ -70,6 +74,8 @@ jobs: with: fetch-depth: '0' - uses: coursier/setup-action@v1 + with: + apps: 'sbt' - name: Install libuv run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala diff --git a/build.sbt b/build.sbt index c35a4dd9fb..82a8453fa4 100644 --- a/build.sbt +++ b/build.sbt @@ -27,7 +27,14 @@ ThisBuild / githubWorkflowPREventTypes := Seq( PREventType.Edited, PREventType.Labeled, ) -ThisBuild / githubWorkflowAddedJobs := + +val coursierSetup = + WorkflowStep.Use( + UseRef.Public("coursier", "setup-action", "v1"), + params = Map("apps" -> "sbt"), + ) + +ThisBuild / githubWorkflowAddedJobs := Seq( WorkflowJob( id = "update_release_draft", @@ -40,7 +47,7 @@ ThisBuild / githubWorkflowAddedJobs := name = "Mima Check", steps = List( WorkflowStep.Use(UseRef.Public("actions", "checkout", "v4"), Map("fetch-depth" -> "0")), - WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), + coursierSetup, ) ++ WorkflowStep.SetupJava(List(JavaSpec.temurin("21"))) :+ WorkflowStep.Sbt(List("mimaChecks")), cond = Option("${{ github.event_name == 'pull_request' }}"), javas = List(JavaSpec.temurin("21")), @@ -78,7 +85,7 @@ ThisBuild / githubWorkflowPublish := //scala fix isn't available for scala 3 so ensure we only run the fmt check //using the latest scala 2.13 ThisBuild / githubWorkflowBuildPreamble := Seq( - WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), + coursierSetup, WorkflowStep.Run( name = Some("Check formatting"), commands = List(s"sbt ++${Scala213} fmtCheck"), @@ -91,7 +98,7 @@ ThisBuild / githubWorkflowBuildPostamble := "checkDocGeneration", "Check doc generation", List( - WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), + coursierSetup, WorkflowStep.Run( commands = List(s"sbt ++${Scala213} doc"), name = Some("Check doc generation"),