Skip to content

fix: convert to sRGB before stripping ICC profile to preserve colors … #59

fix: convert to sRGB before stripping ICC profile to preserve colors …

fix: convert to sRGB before stripping ICC profile to preserve colors … #59

name: docker-variants
on:
push:
branches:
- master
tags: [ 'v*.*.*' ]
jobs:
build-variants:
name: Docker variants
runs-on: ubuntu-latest
if: github.repository == 'cshum/imagor'
permissions:
contents: read
packages: write
strategy:
matrix:
variant:
- name: magick
build_args: |
ENABLE_MAGICK=true
- name: mozjpeg
build_args: |
ENABLE_MOZJPEG=true
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/cshum/imagor-${{ matrix.variant.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: ${{ startsWith(github.ref, 'refs/tags/v') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{ matrix.variant.build_args }}