chore: Fix JVM image build for grpc-hello #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-package | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README*' | |
jobs: | |
build-package-grpc-hello: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# Checkout repository content | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Filter contract-testing | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
grpc-hello-world: | |
- 'grpc-hello-world-demo/**' | |
- name: Set up QEMU | |
#if: github.repository_owner == 'microcks' && steps.changes.outputs.grpc-hello-world == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
#if: github.repository_owner == 'microcks' && steps.changes.outputs.grpc-hello-world == 'true' | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Quay.io Registry and setup multi-arch builder | |
#if: github.repository_owner == 'microcks' && steps.changes.outputs.grpc-hello-world == 'true' | |
run: | | |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io | |
BUILDER=buildx-multi-arch | |
docker buildx inspect $BUILDER || docker buildx create --name=$BUILDER --driver=docker-container --driver-opt=network=host | |
- name: Set up JDK 17 for x64 | |
#if: github.repository_owner == 'microcks' && steps.changes.outputs.grpc-hello-world == 'true' | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
architecture: x64 | |
cache: maven | |
- name: Build and push container image | |
#if: github.repository_owner == 'microcks' && steps.changes.outputs.grpc-hello-world == 'true' | |
run: | | |
cd grpc-hello-world-demo | |
mvn -B package | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=nightly \ | |
--file src/main/docker/Dockerfile.jvm \ | |
--tag=quay.io/microcks/grpc-hello-world:nightly . | |
build-package-contract-testing: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# Checkout repository content | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Filter contract-testing | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
contract-testing: | |
- 'contract-testing-demo/**' | |
- name: Set up QEMU | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing == 'true' | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Quay.io Registry and setup multi-arch builder | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing == 'true' | |
run: | | |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io | |
BUILDER=buildx-multi-arch | |
docker buildx inspect $BUILDER || docker buildx create --name=$BUILDER --driver=docker-container --driver-opt=network=host | |
- name: Build and push container image | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing == 'true' | |
run: | | |
cd contract-testing-demo | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=01 \ | |
--file Dockerfile-01 \ | |
--tag=quay.io/microcks/contract-testing-demo:01 . | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=02 \ | |
--file Dockerfile-02 \ | |
--tag=quay.io/microcks/contract-testing-demo:02 . | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=03 \ | |
--file Dockerfile-03 \ | |
--tag=quay.io/microcks/contract-testing-demo:03 . | |
build-package-contract-testing-async: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# Checkout repository content | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Filter contract-testing-async | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
contract-testing-async: | |
- 'contract-testing-demo-async/**' | |
- name: Set up QEMU | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing-async == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing-async == 'true' | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Quay.io Registry and setup multi-arch builder | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing-async == 'true' | |
run: | | |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io | |
BUILDER=buildx-multi-arch | |
docker buildx inspect $BUILDER || docker buildx create --name=$BUILDER --driver=docker-container --driver-opt=network=host | |
- name: Build and push container image | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.contract-testing-async == 'true' | |
run: | | |
cd contract-testing-demo-async | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=01 \ | |
--file Dockerfile-01 \ | |
--tag=quay.io/microcks/contract-testing-demo-async:01 . | |
docker buildx build --push \ | |
--platform=linux/amd64,linux/arm64 \ | |
--builder=buildx-multi-arch \ | |
--provenance=false \ | |
--build-arg TAG=02 \ | |
--file Dockerfile-02 \ | |
--tag=quay.io/microcks/contract-testing-demo-async:02 . | |
build-package-shift-left-demo-sb: | |
runs-on: ubuntu-latest | |
environment: Build | |
steps: | |
# Checkout repository content | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Filter shift-left-demo-sb | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
shift-left-demo-sb: | |
- 'shift-left-demo/spring-boot-order-service-devtools/**' | |
- name: Set up JDK 17 for x64 | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.shift-left-demo-sb == 'true' | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
architecture: x64 | |
cache: maven | |
- name: Build Java components | |
if: github.repository_owner == 'microcks' && steps.changes.outputs.shift-left-demo-sb == 'true' | |
run: | | |
cd shift-left-demo/spring-boot-order-service-devtools | |
mvn -B clean package |