Skip to content

added GH workflow to build multiarch images on tag push (#15) #1

added GH workflow to build multiarch images on tag push (#15)

added GH workflow to build multiarch images on tag push (#15) #1

Workflow file for this run

name: Build and Publish Multi-arch Docker Image
on:
push:
tags:
- '*'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
run: |
docker buildx build \
-t ghcr.io/canonical/api_demo_server:${{ github.ref_name }} \
--platform linux/amd64,linux/arm64,linux/ppc64le \
--push .