Skip to content
Merged
65 changes: 57 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,39 @@ jobs:
DOCKERHUB_REPO: "otel/demo"
GHCR_REPO: "ghcr.io/open-telemetry/demo"

strategy:
matrix:
file_tag:
- file: ./src/adservice/Dockerfile
tag_suffix: adservice
- file: ./src/cartservice/src/Dockerfile
tag_suffix: cartservice
- file: ./src/checkoutservice/Dockerfile
tag_suffix: checkoutservice
- file: ./src/currencyservice/Dockerfile
tag_suffix: currencyservice
- file: ./src/emailservice/Dockerfile
tag_suffix: emailservice
- file: ./src/frontend/Dockerfile
tag_suffix: frontend
- file: ./src/paymentservice/Dockerfile
tag_suffix: paymentservice
- file: ./src/productcatalogservice/Dockerfile
tag_suffix: productcatalogservice
- file: ./src/quoteservice/Dockerfile
tag_suffix: quoteservice
- file: ./src/shippingservice/Dockerfile
tag_suffix: shippingservice
- file: ./src/featureflagservice/Dockerfile
tag_suffix: featureflagservice
- file: ./src/loadgenerator/Dockerfile
tag_suffix: loadgenerator
- file: ./src/recommendationservice/Dockerfile
tag_suffix: recommendationservice
- file: ./src/frontend/Dockerfile.cypress
tag_suffix: frontend-tests
- file: ./test/Dockerfile
tag_suffix: integrationTests
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -39,6 +72,20 @@ jobs:
echo $'{"max-concurrent-uploads": 1}' | sudo dd status=none of=/etc/docker/daemon.json
sudo service docker restart

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -52,11 +99,13 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: prepare build env
run: make build-env-file

- name: build and push ghcr docker image
run: make build-and-push-ghcr

- name: build and push dockerhub image
run: make build-and-push-dockerhub
- name: Matrix Build and push demo images
uses: docker/[email protected]
with:
context: ./
file: ${{ matrix.file_tag.file }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.RELEASE_VERSION }}-${{ matrix.file_tag.tag_suffix }},${{ env.GHCR_REPO }}:${{ env.RELEASE_VERSION }}-${{ matrix.file_tag.tag_suffix }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#455](https://github.com/open-telemetry/opentelemetry-demo/pull/455))
* Update cartservice Dockerfile to support ARM64
([#439](https://github.com/open-telemetry/opentelemetry-demo/pull/439))
* Build multi-arch/platform images as part of release
([#488](https://github.com/open-telemetry/opentelemetry-demo/pull/488))