Skip to content

Commit

Permalink
Merge pull request #10 from Dwolla/update
Browse files Browse the repository at this point in the history
update sbt-native-packager plugin and other dependencies
  • Loading branch information
bpholt authored Feb 1, 2022
2 parents 5c0bd57 + 6251d9b commit 57a242a
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 61 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: ['*']
branches: ['**']
push:
branches: ['*']
branches: ['**']
tags: [v*]

env:
Expand All @@ -23,19 +23,28 @@ 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)
uses: actions/checkout@v2
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
Expand Down Expand Up @@ -71,19 +80,28 @@ 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)
uses: actions/checkout@v2
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
Expand All @@ -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
Expand All @@ -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
run: sbt ++${{ matrix.scala }} ci-release
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
done
31 changes: 31 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -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
78 changes: 38 additions & 40 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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",
"[email protected]",
url("https://dwolla.com")
)
),
githubWorkflowJavaVersions := Seq("[email protected]", "[email protected]"),
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",
"[email protected]",
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)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.0
sbt.version=1.6.2
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 57a242a

Please sign in to comment.