mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
f8e1bb0f42
Mew re-usable workflows are introduced to handle building, testing and publishing the container image in a uniform and easy way. Now, the `scheduled_builds`, `default_on_push` and a part of the `test_merge_requests` workflow can use the same code for building, testing and publishing the container images. This is DRY. Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
38 lines
1 KiB
YAML
38 lines
1 KiB
YAML
name: 'Test Merge Requests'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- target/**
|
|
- test/**
|
|
- .dockerignore
|
|
- .gitmodules
|
|
- Dockerfile
|
|
- setup.sh
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-image-amd64:
|
|
name: 'Build AMD64 Image'
|
|
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_build.yml@master
|
|
|
|
run-tests:
|
|
name: 'Test AMD64 Image'
|
|
needs: build-image-amd64
|
|
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_test.yml@master
|
|
with:
|
|
cache-key: ${{ needs.build-image-amd64.outputs.build-cache-key }}
|
|
|
|
job-build-arm:
|
|
name: 'Build ARM64 Image'
|
|
# Dependency ensures the cache-key is only created for AMD64 builds.
|
|
# ARM64 will not be able to use this cache, building from scratch each time.
|
|
# Expect about 13 minutes build time until adopting `type=gha` with scopes for cache.
|
|
needs: build-image-amd64
|
|
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_build.yml@master
|
|
with:
|
|
platforms: linux/arm/v7,linux/arm64
|