Merge branch 'release/1.0.0-rc.2' #436
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
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 }} | |
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 | |
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 |