Skip to content

Build base images #4635

Build base images

Build base images #4635

name: Build base images
on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- debian
- centos
otp:
- "24.0"
ghc:
- "8.10.4"
cabal:
- "3.4.0.0"
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/build-push-action@v2
with:
push: true
pull: true
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/base
platforms: 'linux/amd64'
tags: "ghcr.io/${{ github.repository }}/base:otp${{ matrix.otp }}-ghc${{ matrix.ghc }}-cabal${{ matrix.cabal }}-${{ matrix.os }}"
build-args: |
OTP_VERSION=${{ matrix.otp }}
GHC_VERSION=${{ matrix.ghc }}
CABAL_VERSION=${{ matrix.cabal }}
file: .github/dockerfile/Dockerfile.${{ matrix.os }}
context: .