Skip to content

Merge branch 'release/1.0.0-rc.25' #47

Merge branch 'release/1.0.0-rc.25'

Merge branch 'release/1.0.0-rc.25' #47

Workflow file for this run

name: Docker Build OTP 26
on:
workflow_dispatch:
push:
branches : [develop, master]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
name: Build an publish docker images to multiple registries
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# without registry name, we will add it in the build-push-action as
# each registry has diff namespace at the moment
images: |
bondy
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
flavor: |
latest=false
prefix=
suffix=
labels: |
maintainer=Leapsight
org.opencontainers.image.title=Bondy
org.opencontainers.image.description=Bondy is an open source, always-on and scalable application networking platform connecting all elements of a distributed application—offering event and service mesh capabilities combined. From web and mobile apps to IoT devices and backend microservices, Bondy allows everything to talk using one simple communication protocol.
org.opencontainers.image.vendor=Leapsight
-
name: Build, cache and push standard image
uses: docker/build-push-action@v3
with:
context: .
file: ./deployment/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: leapsight/${{ steps.meta.outputs.tags }},leapsight/${{ steps.meta.outputs.tags }}-otp26
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=leapsight/${{ steps.meta.outputs.tags }}-buildcache
cache-to: type=registry,ref=leapsight/${{ steps.meta.outputs.tags }}-buildcache,mode=max
-
# Copy multiplatform image from dockerhub to multiple registries
# without changing the image SHA
name: Copy Image to multiple registries
uses: akhilerm/[email protected]
with:
src: docker.io/leapsight/${{ steps.meta.outputs.tags }}
dst: |
ghcr.io/bondy-io/${{ steps.meta.outputs.tags }}
-
name: Build and push alpine image
uses: docker/build-push-action@v3
with:
context: .
file: ./deployment/alpine.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: leapsight/${{ steps.meta.outputs.tags }}-alpine,leapsight/${{ steps.meta.outputs.tags }}-alpine-otp26
labels: ${{ steps.meta.outputs.labels }}
-
# Copy multiplatform image from dockerhub to multiple registries
# without changing the image SHA
name: Copy Image to multiple registries
uses: akhilerm/[email protected]
with:
src: docker.io/leapsight/${{ steps.meta.outputs.tags }}-alpine
dst: |
ghcr.io/bondy-io/${{ steps.meta.outputs.tags }}-alpine
-
# Copy multiplatform image from dockerhub to multiple registries
# without changing the image SHA
name: Copy Image to multiple registries
uses: akhilerm/[email protected]
with:
src: docker.io/leapsight/${{ steps.meta.outputs.tags }}-alpine-otp26
dst: |
ghcr.io/bondy-io/${{ steps.meta.outputs.tags }}-alpine-otp26