Skip to content

Release v0.3.6

Release v0.3.6 #20

Workflow file for this run

name: Publish artifacts
on:
# Will only run when release is published.
release:
types:
- created
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-22.04
strategy:
matrix:
java-major-version: [11, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_PUBLISH_USER }}
password: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }}
- name: Read Java Version
shell: bash
id: versions
run: |
ZULU_JDK_VERSION=$(cat java-${{ matrix.java-major-version}}/java.version | tr -d "\n")
echo ZULU_JDK_VERSION=${ZULU_JDK_VERSION} >> $GITHUB_OUTPUT
echo JAVA_MAJOR_VERSION=$(echo $ZULU_JDK_VERSION | cut -d'.' -f1) >> $GITHUB_OUTPUT
echo JAVA_FULL_VERSION=$(echo $ZULU_JDK_VERSION | cut -d'-' -f1) >> $GITHUB_OUTPUT
BASE_IMAGE=$(cat java-${{ matrix.java-major-version}}/base.image | tr -d "\n")
echo BASE_IMAGE=${BASE_IMAGE} >> $GITHUB_OUTPUT
- name: Publish Java ${{ matrix.java-major-version}} image
uses: docker/build-push-action@v5
with:
context: java-${{ matrix.java-major-version}}
platforms: linux/amd64,linux/arm64
build-args: |
JAVA_VERSION=${{ steps.versions.outputs.ZULU_JDK_VERSION }}
BASE_IMAGE=${{ steps.versions.outputs.BASE_IMAGE }}
tags: hypertrace/java:${{ steps.versions.outputs.JAVA_MAJOR_VERSION }},hypertrace/java:${{ steps.versions.outputs.JAVA_FULL_VERSION }}
push: true