split docker to use base image for faster builds (#4586)
This commit is contained in:
43
.github/workflows/docker-base.yaml
vendored
Normal file
43
.github/workflows/docker-base.yaml
vendored
Normal 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
|
||||
|
||||
|
||||
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
@@ -49,8 +49,6 @@ jobs:
|
||||
kimai/kimai2:${{ matrix.server }}-${{ matrix.type }}
|
||||
kimai/kimai2:${{ matrix.server }}-${{ env.kimai_version }}-${{ matrix.type }}
|
||||
push: true
|
||||
- name: Test Lite
|
||||
run: docker run --rm --entrypoint /assets/test-lite.sh kimai/kimai2:${{ matrix.server }}-${{ matrix.type }}
|
||||
|
||||
tag:
|
||||
needs: build
|
||||
|
||||
Reference in New Issue
Block a user