From c4aa4fdc75839f521fe8b14f7c03c5881ed284d6 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Tue, 19 Dec 2023 23:10:38 +0530 Subject: [PATCH] [Chore] Build and publish Telemetrygen images with multiarch support (#29905) **Description:** This PR updates the Telemetrygen workflow to build and publish multiarch images. Resolves https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30072 **Testing:** ToDo **Documentation:** --------- Signed-off-by: Ishwar Kanse --- .github/workflows/telemetrygen.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/telemetrygen.yml b/.github/workflows/telemetrygen.yml index 4fba30033737..fabaf6e36000 100644 --- a/.github/workflows/telemetrygen.yml +++ b/.github/workflows/telemetrygen.yml @@ -17,12 +17,17 @@ jobs: if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }} steps: - 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: Build telemetrygen uses: docker/build-push-action@v5 with: context: cmd/telemetrygen push: false tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:dev + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le publish-latest: runs-on: ubuntu-latest @@ -31,6 +36,10 @@ jobs: packages: write steps: - 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 GitHub Container Registry uses: docker/login-action@v3 with: @@ -43,6 +52,7 @@ jobs: context: cmd/telemetrygen push: true tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le publish-stable: runs-on: ubuntu-latest @@ -51,6 +61,10 @@ jobs: packages: write steps: - 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: Set Release Tag id: github_tag run: ./.github/workflows/scripts/set_release_tag.sh @@ -61,8 +75,9 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push telemetrygen to Github packages - run: | - docker build cmd/telemetrygen -t ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG - docker push ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG - env: - RELEASE_TAG: ${{ steps.github_tag.outputs.tag }} + uses: docker/build-push-action@v5 + with: + context: cmd/telemetrygen + push: true + tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:${{ steps.github_tag.outputs.tag }} + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le