Skip to content

GeneWeb Docker

GeneWeb Docker #399

Workflow file for this run

name: GeneWeb Docker
on:
workflow_dispatch:
push:
branches:
- master
tags:
- v*
paths-ignore:
- 'etc/**'
- 'hd/**'
- 'man/**'
- '**/*.md'
- 'geneweb_colab.ipynb'
- 'ICHANGES'
- 'INSTALL'
- 'LICENSE'
- 'CHANGES'
- '.gitattributes'
- '.gitignore'
- '.git-blame-ignore-revs'
- '.ocamlformat'
- '.ocamlformat-ignore'
- 'geneweb.iss'
- 'geneweb.opam.template'
pull_request:
paths-ignore:
- 'etc/**'
- 'hd/**'
- 'man/**'
- '**/*.md'
- 'geneweb_colab.ipynb'
- 'ICHANGES'
- 'INSTALL'
- 'LICENSE'
- 'CHANGES'
- '.gitattributes'
- '.gitignore'
- '.git-blame-ignore-revs'
- '.ocamlformat'
- '.ocamlformat-ignore'
- 'geneweb.iss'
- 'geneweb.opam.template'
env:
IMAGE_NAME: "geneweb"
PUSH_IMAGE: ${{ startsWith(github.ref, 'refs/tags/v') }}
jobs:
build-ubuntu-24-amd64:
runs-on: ubuntu-24.04
env:
CACHE_FROM: type=gha,scope=docker-build-amd64
CACHE_TO: type=gha,scope=docker-build-amd64,mode=max
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
fetch-depth: 1
- name: Generate Docker image metadata
id: docker-meta
uses: docker/metadata-action@v6
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=edge,branch=master
type=sha,prefix=,format=short
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=GeneWeb
org.opencontainers.image.description=Genealogy Software
maintainer=${{ github.repository_owner }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
platforms: linux/amd64
driver-opts: |
network=host
image=moby/buildkit:latest
- name: Login to GitHub Container Registry
if: ${{ env.PUSH_IMAGE == 'true' }}
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile
target: container
platforms: linux/amd64
push: ${{ env.PUSH_IMAGE }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
cache-from: ${{ env.CACHE_FROM }}
cache-to: ${{ env.CACHE_TO }}
build-args: |
BUILDKIT_INLINE_CACHE=1
BUILDKIT_PROGRESS=plain
FAST_BUILD=${{ github.ref != 'refs/heads/master' && '1' || '0' }}
build-ubuntu-24-arm64:
runs-on: ubuntu-24.04-arm
env:
CACHE_FROM: type=gha,scope=docker-build-arm64
CACHE_TO: type=gha,scope=docker-build-arm64,mode=max
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
fetch-depth: 1
- name: Generate Docker image metadata
id: docker-meta
uses: docker/metadata-action@v6
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=edge,branch=master
type=sha,prefix=,format=short
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=GeneWeb
org.opencontainers.image.description=Genealogy Software
maintainer=${{ github.repository_owner }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
if: ${{ env.PUSH_IMAGE == 'true' }}
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile
target: container
platforms: linux/arm64/v8
push: ${{ env.PUSH_IMAGE }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
cache-from: ${{ env.CACHE_FROM }}
cache-to: ${{ env.CACHE_TO }}
build-args: |
BUILDKIT_INLINE_CACHE=1
BUILDKIT_PROGRESS=plain
FAST_BUILD=${{ github.ref != 'refs/heads/master' && '1' || '0' }}