Skip to content

feat: add multi arch support #59

feat: add multi arch support

feat: add multi arch support #59

Workflow file for this run

name: build and validate
on:
push:
branches:
- main
pull_request_target:
branches:
- main
jobs:
build-java-11:
runs-on: ubuntu-22.04
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_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
- name: Extract args
uses: ./.github/workflows/extract-args.yml
with:
file: java-11/args.env
image: hypertrace/java
- name: Build java 11
uses: docker/build-push-action@v5
with:
context: java-11
platforms: linux/amd64,linux/arm64
build-args: |
${{ env.ARGS_CONTENT }}
tags: ${{ env.IMAGE_TAGS }}
- name: Scan java-11 image
uses: hypertrace/github-actions/trivy-image-scan@main
with:
image: hypertrace/java
tag: 11
category: java-11
output-mode: github
build-java-21:
runs-on: ubuntu-22.04
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_READ_USER }}
password: ${{ secrets.DOCKERHUB_READ_TOKEN }}
- name: Extract args
uses: ./.github/workflows/extract-args.yml
with:
file: java-21/args.env
image: hypertrace/java
- name: Build java 21
uses: docker/build-push-action@v5
with:
context: java-21
platforms: linux/amd64,linux/arm64
build-args: |
${{ env.ARGS_CONTENT }}
tags: ${{ env.IMAGE_TAGS }}
- name: Scan java-11 image
uses: hypertrace/github-actions/trivy-image-scan@main
with:
image: hypertrace/java
tag: 11
category: java-11
output-mode: github