Skip to content

Multi architecture images from networking dev tools #4

Multi architecture images from networking dev tools

Multi architecture images from networking dev tools #4

Workflow file for this run

name: grpcbin image build & push
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
env:
REGISTRY_URL: europe-central2-docker.pkg.dev/sap-se-cx-kyma-goat/networking-dev-tools/grpcbin
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: europe-central2-docker.pkg.dev
username: _json_key_base64
password: ${{ secrets.DOCKER_PUSH_SA_KEY }}
- name: Build amd64 Docker image
uses: docker/build-push-action@v5
with:
file: grpcbin/Dockerfile
context: grpcbin
platforms: linux/amd64
provenance: false
push: true
tags: ${{ env.REGISTRY_URL }}:${{ github.sha }}-amd64,${{ env.REGISTRY_URL }}:amd64
- name: Build arm64 Docker image
uses: docker/build-push-action@v5
with:
file: grpcbin/Dockerfile
context: grpcbin
platforms: linux/arm64
provenance: false
push: true
tags: ${{ env.REGISTRY_URL }}:${{ github.sha }}-arm64,${{ env.REGISTRY_URL }}:arm64
- name: Build latest manifest
shell: bash
run: |
docker manifest create ${{ env.REGISTRY_URL }}:latest \
${{ env.REGISTRY_URL }}:amd64 ${{ env.REGISTRY_URL }}:arm64
- name: Push latest manifest
shell: bash
run: |
docker manifest push ${{ env.REGISTRY_URL }}:latest