Skip to content

Build Docker Image

Build Docker Image #8

Workflow file for this run

name: Build Docker Image
on:
workflow_dispatch:
workflow_run:
workflows: ['CI']
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Docker build context
run: ./docker/prepare.sh
- name: Build multi-arch Docker image
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
# multi-arch magic:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max