Skip to content

Commit c4aa4fd

Browse files
author
Ishwar Kanse
authored
[Chore] Build and publish Telemetrygen images with multiarch support (open-telemetry#29905)
**Description:** <Describe what has changed.> This PR updates the Telemetrygen workflow to build and publish multiarch images. Resolves open-telemetry#30072 **Testing:** <Describe what testing was performed and which tests were added.> ToDo **Documentation:** <Describe the documentation added.> --------- Signed-off-by: Ishwar Kanse <ikanse@redhat.com>
1 parent cd8cef0 commit c4aa4fd

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/telemetrygen.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,17 @@ jobs:
1717
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }}
1818
steps:
1919
- uses: actions/checkout@v4
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v3
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
2024
- name: Build telemetrygen
2125
uses: docker/build-push-action@v5
2226
with:
2327
context: cmd/telemetrygen
2428
push: false
2529
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:dev
30+
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
2631

2732
publish-latest:
2833
runs-on: ubuntu-latest
@@ -31,6 +36,10 @@ jobs:
3136
packages: write
3237
steps:
3338
- uses: actions/checkout@v4
39+
- name: Set up QEMU
40+
uses: docker/setup-qemu-action@v3
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v3
3443
- name: Login to GitHub Container Registry
3544
uses: docker/login-action@v3
3645
with:
@@ -43,6 +52,7 @@ jobs:
4352
context: cmd/telemetrygen
4453
push: true
4554
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
55+
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
4656

4757
publish-stable:
4858
runs-on: ubuntu-latest
@@ -51,6 +61,10 @@ jobs:
5161
packages: write
5262
steps:
5363
- uses: actions/checkout@v4
64+
- name: Set up QEMU
65+
uses: docker/setup-qemu-action@v3
66+
- name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v3
5468
- name: Set Release Tag
5569
id: github_tag
5670
run: ./.github/workflows/scripts/set_release_tag.sh
@@ -61,8 +75,9 @@ jobs:
6175
username: ${{ github.repository_owner }}
6276
password: ${{ secrets.GITHUB_TOKEN }}
6377
- name: Push telemetrygen to Github packages
64-
run: |
65-
docker build cmd/telemetrygen -t ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG
66-
docker push ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:$RELEASE_TAG
67-
env:
68-
RELEASE_TAG: ${{ steps.github_tag.outputs.tag }}
78+
uses: docker/build-push-action@v5
79+
with:
80+
context: cmd/telemetrygen
81+
push: true
82+
tags: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:${{ steps.github_tag.outputs.tag }}
83+
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le

0 commit comments

Comments
 (0)