Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sbtVersion tag #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ on:
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
scalaVersion: ['2.12.17', '2.13.10', '3.2.2']
sbtVersion: ['1.8.2']
javaTag: [
'graalvm-ce-22.3.0-b2-java17',
'graalvm-ce-22.3.0-b2-java11',
Expand Down Expand Up @@ -73,20 +71,10 @@ jobs:
# install: true
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Get latest SBT version
id: get_sbt_version
run: |
SBT_VERSION=$(
curl --silent -L https://github.com/sbt/sbt/releases |
grep -i -w -o '>[0-9]*\.[0-9]*\.[0-9]*</a>' |
grep -i -w -o '[0-9]*\.[0-9]*\.[0-9]*' |
sort --version-sort | tail -n 1)
[[ -z "$SBT_VERSION" ]] && { echo "Failed to get latest sbt version" ; exit 1; }
echo "VERSION=$SBT_VERSION" >> $GITHUB_OUTPUT
- name: Create docker tag
id: create_docker_tag
run: |
TAG=sbtscala/scala-sbt:${{ matrix.javaTag }}_${{ steps.get_sbt_version.outputs.VERSION }}_${{ matrix.scalaVersion }}
TAG=sbtscala/scala-sbt:${{ matrix.javaTag }}_${{ matrix.sbtVersion }}_${{ matrix.scalaVersion }}
echo "TAG=$TAG" >> $GITHUB_OUTPUT
- name: Build docker image
uses: docker/build-push-action@v4
Expand All @@ -96,7 +84,7 @@ jobs:
tags: ${{ steps.create_docker_tag.outputs.TAG }}
build-args: |
BASE_IMAGE_TAG=${{ matrix.baseImageTag }}
SBT_VERSION=${{ steps.get_sbt_version.outputs.VERSION }}
SBT_VERSION=${{ matrix.sbtVersion }}
SCALA_VERSION=${{ matrix.scalaVersion }}
load: true
- name: Test docker image as root (default)
Expand Down Expand Up @@ -127,7 +115,7 @@ jobs:
tags: ${{ steps.create_docker_tag.outputs.TAG }}
build-args: |
BASE_IMAGE_TAG=${{ matrix.baseImageTag }}
SBT_VERSION=${{ steps.get_sbt_version.outputs.VERSION }}
SBT_VERSION=${{ matrix.sbtVersion }}
SCALA_VERSION=${{ matrix.scalaVersion }}
platforms: ${{ matrix.platforms }}
push: true
2 changes: 1 addition & 1 deletion eclipse-temurin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM eclipse-temurin:${BASE_IMAGE_TAG:-11.0.16.1_1-jdk}
ARG SCALA_VERSION
ENV SCALA_VERSION ${SCALA_VERSION:-2.13.10}
ARG SBT_VERSION
ENV SBT_VERSION ${SBT_VERSION:-1.6.2}
ENV SBT_VERSION ${SBT_VERSION:-1.8.2}
ARG USER_ID
ENV USER_ID ${USER_ID:-1001}
ARG GROUP_ID
Expand Down
2 changes: 1 addition & 1 deletion graalvm-ce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FROM ghcr.io/graalvm/graalvm-ce:${BASE_IMAGE_TAG:-java11-21.3.0}
ARG SCALA_VERSION
ENV SCALA_VERSION ${SCALA_VERSION:-2.13.10}
ARG SBT_VERSION
ENV SBT_VERSION ${SBT_VERSION:-1.6.2}
ENV SBT_VERSION ${SBT_VERSION:-1.8.2}
ENV JAVA_OPTS -XX:+UseG1GC
ARG USER_ID
ENV USER_ID ${USER_ID:-1001}
Expand Down