Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ concurrency:
cancel-in-progress: false # let each merge finish publishing, in order

jobs:

build:
name: Build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
java-version: '11'
java-version: ${{ vars.WORKING_JAVA_VERSION }}
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v6 # also validates the wrapper jar
with:
cache-provider: basic
- name: Build, lint and test
run: ./gradlew build # `check` includes spotlessCheck
- name: Upload test reports
Expand All @@ -38,7 +41,7 @@ jobs:
name: jar
path: build/libs/*.jar

image:
containerize:
name: Publish image to GHCR
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -68,6 +71,8 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
build-args: |
DOCKER_BASE_JAVA_VERSION_TAG=${{ vars.DOCKER_BASE_JAVA_VERSION_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
java-version: '11'
java-version: ${{ vars.WORKING_JAVA_VERSION }}
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v6 # also validates the wrapper jar
with:
cache-provider: basic
- name: Check formatting
run: ./gradlew spotlessCheck

Expand All @@ -32,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['11', '17']
java: ${{ fromJSON(vars.SUPPORTED_JAVA_VERSIONS) }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
Expand All @@ -50,14 +52,14 @@ jobs:
name: test-reports-jdk${{ matrix.java }}
path: build/reports/tests/
- name: Upload jar
if: matrix.java == '11'
if: matrix.java == '17'
uses: actions/upload-artifact@v7
with:
name: jar
path: build/libs/*.jar
retention-days: 3

image:
containerize:
name: Container build (no push)
runs-on: ubuntu-latest
needs: test
Expand All @@ -72,6 +74,8 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
build-args: |
DOCKER_BASE_JAVA_VERSION_TAG=${{ vars.DOCKER_BASE_JAVA_VERSION_TAG }}
push: false
tags: ghcr.io/${{ github.repository }}:pr-${{ github.event.pull_request.number }}
cache-from: type=gha
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
java-version: '11'
java-version: ${{ vars.WORKING_JAVA_VERSION }}
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v6 # also validates the wrapper jar
with:
Expand Down Expand Up @@ -58,6 +58,8 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
build-args: |
DOCKER_BASE_JAVA_VERSION_TAG=${{ vars.DOCKER_BASE_JAVA_VERSION_TAG }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:11
ARG DOCKER_BASE_JAVA_VERSION_TAG=17
FROM eclipse-temurin:${DOCKER_BASE_JAVA_VERSION_TAG}
WORKDIR /extproc
COPY build/libs/extproc-*.jar ./extproc.jar
EXPOSE 50051
Expand Down
Loading