From 71e85310434e33b1a94d68d8d02811930fe5630d Mon Sep 17 00:00:00 2001 From: Carles Garcia Date: Wed, 8 Jan 2025 11:34:14 +0100 Subject: [PATCH] Add docker manifest creation in the workflow (#4527) --- .github/workflows/docker.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9ed62a6a1c6..c02e3798ca2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -64,12 +64,42 @@ jobs: TAG_ARCH="$TAG-${{ matrix.runner_arch.arch }}" docker push grafana/${{ matrix.component }}:$TAG_ARCH + manifest: + if: github.repository == 'grafana/tempo' + needs: ['get-tag', 'docker'] + strategy: + matrix: + component: [ tempo, tempo-vulture, tempo-query, tempo-cli ] + runs-on: ubuntu-24.04 + env: + TAG: ${{ needs.get-tag.outputs.tag }} + IMAGE_NAME: grafana/${{ matrix.component }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to DockerHub + uses: grafana/shared-workflows/actions/dockerhub-login@dockerhub-login-v1.0.0 + + - name: docker-manifest-create-and-push + run: | + docker manifest create \ + $IMAGE_NAME:$TAG \ + --amend $IMAGE_NAME:$TAG-amd64 \ + --amend $IMAGE_NAME:$TAG-arm64 + docker manifest push $IMAGE_NAME:$TAG + + docker manifest create \ + $IMAGE_NAME:latest \ + --amend $IMAGE_NAME:$TAG-amd64 \ + --amend $IMAGE_NAME:$TAG-arm64 + docker manifest push $IMAGE_NAME:latest cd-to-dev-env: # This job deploys the latest main commit to the dev environment if: github.repository == 'grafana/tempo' && github.ref == 'refs/heads/main' runs-on: ubuntu-24.04 - needs: docker + needs: manifest steps: - name: Checkout uses: actions/checkout@v4