1
1
Fork 0
mirror of https://github.com/docker-mailserver/docker-mailserver synced 2024-05-29 12:36:06 +02:00
docker-mailserver/.github/workflows/default_on_push.yml
Georg Lauterbach f8e1bb0f42
ci: improve GitHub Action CI with re-usable workflows (#2753)
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>
2022-09-09 11:12:17 +02:00

40 lines
930 B
YAML

name: 'Build, Test & Deploy'
on:
workflow_dispatch:
push:
branches:
- master
paths:
- target/**
- .dockerignore
- .gitmodules
- Dockerfile
- setup.sh
tags:
- '*.*.*'
permissions:
contents: read
packages: write
jobs:
build-image:
name: 'Build AMD64 Image'
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_build.yml@master
run-tests:
name: 'Test AMD64 Image'
needs: build-image
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_test.yml@master
with:
cache-key: ${{ needs.build-image.outputs.build-cache-key }}
publish-images:
name: 'Publish AMD64 and ARM64 Image'
needs: [build-image, run-tests]
uses: docker-mailserver/docker-mailserver/.github/workflows/generic_publish.yml@master
with:
cache-key: ${{ needs.build-image.outputs.build-cache-key }}
secrets: inherit