split docker to use base image for faster builds (#4586)

This commit is contained in:
Toby Batch
2024-04-02 16:50:24 +01:00
committed by GitHub
parent 3a358b1434
commit 2ac783a300
6 changed files with 260 additions and 212 deletions

43
.github/workflows/docker-base.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: 'Docker Build'
# act -j build -W ./.github/workflows/docker-base.yaml --secret-file .dockerhub.secrets
on:
workflow_dispatch:
schedule:
- cron: "0 4 5 * *" # build on the 5th of every month
jobs:
build:
strategy:
matrix:
server: [ fpm, apache ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build
uses: docker/build-push-action@v4
with:
context: .docker
file: .docker/Dockerfile.kimai-base
build-args: |
TIMEZONE=Europe/London
BASE=${{ matrix.server }}
platforms: linux/amd64,linux/arm64 #,linux/arm/v8,linux/arm/v7,linux/arm/v6
tags: |
kimai/kimai-base:${{ matrix.server }}
push: true