Skip to content

Build Multiarch Docker Image #7

Build Multiarch Docker Image

Build Multiarch Docker Image #7

name: Build Multiarch Docker Image
on:
release:
types: [published]
env:
DOCKER_IMAGE: bboerst/stratum-work-webapp
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: ./webapp
push: true
tags: |
${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_IMAGE }}:${{ github.event.release.tag_name }}
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}