Skip to content

Commit

Permalink
[Chore] Build and publish Telemetrygen images with multiarch support (#…
Browse files Browse the repository at this point in the history
…29905)

**Description:** <Describe what has changed.>
This PR updates the Telemetrygen workflow to build and publish multiarch
images.

Resolves
#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>
  • Loading branch information
IshwarKanse committed Dec 19, 2023
1 parent cd8cef0 commit c4aa4fd
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/telemetrygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit c4aa4fd

Please sign in to comment.