From b1c8754b8f74aae9c9b7d99ec7d7908cd28a6153 Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Tue, 1 Feb 2022 12:28:31 -0600 Subject: [PATCH 1/2] update sbt-native-packager plugin and other dependencies --- .github/workflows/ci.yml | 50 ++++++++++++++++-------- .github/workflows/clean.yml | 2 +- build.sbt | 78 ++++++++++++++++++------------------- project/build.properties | 2 +- project/plugins.sbt | 6 +-- 5 files changed, 77 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d29187..cc1497f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,9 @@ name: Continuous Integration on: pull_request: - branches: ['*'] + branches: ['**'] push: - branches: ['*'] + branches: ['**'] tags: [v*] env: @@ -23,8 +23,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.13] - java: [adopt@1.8, adopt@1.11] + scala: [2.12.15] + java: [temurin@8, temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -32,10 +32,19 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v10 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 11 - name: Cache sbt uses: actions/cache@v2 @@ -71,8 +80,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.13] - java: [adopt@1.8] + scala: [2.12.15] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -80,10 +89,19 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v10 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@11) + if: matrix.java == 'temurin@11' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 11 - name: Cache sbt uses: actions/cache@v2 @@ -97,12 +115,12 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (2.12.13) + - name: Download target directories (2.12.15) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.12.13-${{ matrix.java }} + name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }} - - name: Inflate target directories (2.12.13) + - name: Inflate target directories (2.12.15) run: | tar xf targets.tar rm targets.tar @@ -112,4 +130,4 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbt ++${{ matrix.scala }} ci-release \ No newline at end of file + run: sbt ++${{ matrix.scala }} ci-release diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index b535fcc..547aaa4 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -56,4 +56,4 @@ jobs: printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size ghapi -X DELETE $REPO/actions/artifacts/$id done - done \ No newline at end of file + done diff --git a/build.sbt b/build.sbt index fd62f48..988b3dc 100644 --- a/build.sbt +++ b/build.sbt @@ -1,47 +1,45 @@ -inThisBuild(List( - organization := "com.dwolla.sbt", - description := "SBT plugin to define and manage Docker containers based on images creating using sbt-native-packager", - sbtPlugin := true, - startYear := Option(2016), - addSbtPlugin("com.typesafe.sbt" %% "sbt-native-packager" % "1.3.22"), - libraryDependencies ++= { - val specs2Version = "4.5.1" - - Seq( - "org.specs2" %% "specs2-core" % specs2Version % Test, - ) - }, - homepage := Option(url("https://github.com/Dwolla/sbt-docker-containers")), - licenses += ("MIT", url("http://opensource.org/licenses/MIT")), - developers := List( - Developer( - "bpholt", - "Brian Holt", - "bholt@dwolla.com", - url("https://dwolla.com") - ) - ), - githubWorkflowJavaVersions := Seq("adopt@1.8", "adopt@1.11"), - githubWorkflowTargetTags ++= Seq("v*"), - githubWorkflowPublishTargetBranches := - Seq(RefPredicate.StartsWith(Ref.Tag("v"))), - githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted"), name = Some("Build and test project"))), - githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))), - githubWorkflowPublish := Seq( - WorkflowStep.Sbt( - List("ci-release"), - env = Map( - "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", - "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", - "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", - "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}" - ) +ThisBuild / organization := "com.dwolla.sbt" +ThisBuild / startYear := Option(2016) +ThisBuild / homepage := Option(url("https://github.com/Dwolla/sbt-docker-containers")) +ThisBuild / licenses += ("MIT", url("http://opensource.org/licenses/MIT")) +ThisBuild / developers := List( + Developer( + "bpholt", + "Brian Holt", + "bholt@dwolla.com", + url("https://dwolla.com") + ) +) +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11")) +ThisBuild / githubWorkflowTargetTags ++= Seq("v*") +ThisBuild / githubWorkflowPublishTargetBranches := + Seq(RefPredicate.StartsWith(Ref.Tag("v"))) +ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted"), name = Some("Build and test project"))) +ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))) +ThisBuild / githubWorkflowPublish := Seq( + WorkflowStep.Sbt( + List("ci-release"), + env = Map( + "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", + "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", + "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", + "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}" ) - ), -)) + ) +) lazy val `docker-containers` = (project in file(".")) .settings( + sbtPlugin := true, + description := "SBT plugin to define and manage Docker containers based on images creating using sbt-native-packager", sonatypeProfileName := "com.dwolla", + addSbtPlugin("com.github.sbt" %% "sbt-native-packager" % "1.9.7"), + libraryDependencies ++= { + val specs2Version = "4.13.2" + + Seq( + "org.specs2" %% "specs2-core" % specs2Version % Test, + ) + }, ) .enablePlugins(SbtPlugin) diff --git a/project/build.properties b/project/build.properties index e67343a..c8fcab5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.0 +sbt.version=1.6.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index cb33a72..9b234e9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,6 @@ logLevel := Level.Warn libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.5") -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") From 6251d9bb69da1715e4d0e8939aec512b97dbaa5a Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Tue, 1 Feb 2022 12:30:39 -0600 Subject: [PATCH 2/2] add mergify config --- .mergify.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..8577e9a --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,31 @@ +queue_rules: + - name: default + conditions: + - status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@11) + - status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@8) + +pull_request_rules: + - name: assign and label scala-steward's PRs + conditions: + - author=scala-steward + actions: + request_reviews: + users: [bpholt] + label: + add: [dependency-update] + - name: automatic update pull requests + conditions: + - author=scala-steward + - -conflict # skip PRs with conflicts + - -draft # filter-out GH draft PRs + actions: + update: + - name: merge scala-steward's PRs + conditions: + - author=scala-steward + - status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@11) + - status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@8) + actions: + queue: + method: squash + name: default