Skip to content

feat: add Dockerfile and Docker build Workflow #4

feat: add Dockerfile and Docker build Workflow

feat: add Dockerfile and Docker build Workflow #4

Workflow file for this run

name: Docker build
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
ubuntu-build:
runs-on: ubuntu-24.04
steps:
- name: checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64