From c0fa17f1ff3ae318bbb33364da0493901f9e124d Mon Sep 17 00:00:00 2001 From: Austin Parker Date: Tue, 18 Jun 2024 14:10:50 -0400 Subject: [PATCH] Revert "Use native runners (#1613)" (#1616) This reverts commit ee92851daaf157bd2e5eaa9a3890305bf6d212c3. --- .github/workflows/component_build-images.yml | 32 ++++++++++++++++++-- .github/workflows/force-build.yml | 14 --------- 2 files changed, 30 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/force-build.yml diff --git a/.github/workflows/component_build-images.yml b/.github/workflows/component_build-images.yml index 26adf67e23..e908ec6f79 100644 --- a/.github/workflows/component_build-images.yml +++ b/.github/workflows/component_build-images.yml @@ -27,7 +27,7 @@ on: jobs: build_and_push_images: - runs-on: "${{ matrix.os }}" + runs-on: ubuntu-latest permissions: contents: read packages: write @@ -38,65 +38,83 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, otel-linux-arm64] file_tag: - file: ./src/accountingservice/Dockerfile tag_suffix: accountingservice context: ./ + setup-qemu: true - file: ./src/adservice/Dockerfile tag_suffix: adservice context: ./ + setup-qemu: true - file: ./src/cartservice/src/Dockerfile tag_suffix: cartservice context: ./ + setup-qemu: false - file: ./src/checkoutservice/Dockerfile tag_suffix: checkoutservice context: ./ + setup-qemu: true - file: ./src/currencyservice/Dockerfile tag_suffix: currencyservice context: ./ + setup-qemu: true - file: ./src/emailservice/Dockerfile tag_suffix: emailservice context: ./src/emailservice + setup-qemu: true - file: ./src/frauddetectionservice/Dockerfile tag_suffix: frauddetectionservice context: ./ + setup-qemu: true - file: ./src/frontend/Dockerfile tag_suffix: frontend context: ./ + setup-qemu: true - file: ./src/frontendproxy/Dockerfile tag_suffix: frontendproxy context: ./ + setup-qemu: true - file: ./src/frontend/Dockerfile.cypress tag_suffix: frontend-tests context: ./ + setup-qemu: true - file: ./src/imageprovider/Dockerfile tag_suffix: imageprovider context: ./ + setup-qemu: true - file: ./src/kafka/Dockerfile tag_suffix: kafka context: ./ + setup-qemu: true - file: ./src/loadgenerator/Dockerfile tag_suffix: loadgenerator context: ./ + setup-qemu: true - file: ./src/paymentservice/Dockerfile tag_suffix: paymentservice context: ./ + setup-qemu: true - file: ./src/productcatalogservice/Dockerfile tag_suffix: productcatalogservice context: ./ + setup-qemu: true - file: ./src/quoteservice/Dockerfile tag_suffix: quoteservice context: ./ + setup-qemu: true - file: ./src/recommendationservice/Dockerfile tag_suffix: recommendationservice context: ./ + setup-qemu: true - file: ./src/shippingservice/Dockerfile tag_suffix: shippingservice context: ./ + setup-qemu: true - file: ./test/tracetesting/Dockerfile tag_suffix: traceBasedTests context: ./ + setup-qemu: true steps: - uses: actions/checkout@v4 @@ -131,14 +149,24 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} if: ${{ inputs.push }} + - name: Set up QEMU + if: ${{ matrix.file_tag.setup-qemu }} + uses: docker/setup-qemu-action@v3 + with: + image: tonistiigi/binfmt:master - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + buildkitd-config-inline: | + [worker.oci] + max-parallelism = 2 - name: Matrix Build and push demo images if: steps.check_changes.outputs.skip == 'false' uses: docker/build-push-action@v6.0.0 with: context: ${{ matrix.file_tag.context }} file: ${{ matrix.file_tag.file }} + platforms: linux/amd64,linux/arm64 push: ${{ inputs.push }} tags: | ${{ inputs.dockerhub_repo }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }} diff --git a/.github/workflows/force-build.yml b/.github/workflows/force-build.yml deleted file mode 100644 index 805c2df8a1..0000000000 --- a/.github/workflows/force-build.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -name: Force Build - -on: - workflow_dispatch: - -jobs: - force_build: - uses: ./.github/workflows/component_build-images.yml - with: - push: true - version: 'dev'