Skip to content

feat: add multi arch support #84

feat: add multi arch support

feat: add multi arch support #84

Workflow file for this run

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