mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Streamline workflow step seperation (#2222)
* streamline workflow step separation * doh! Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
This commit is contained in:
parent
5966623b1a
commit
f2c4712c4f
16
.github/workflows/contributors.yml
vendored
16
.github/workflows/contributors.yml
vendored
|
@ -9,28 +9,26 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
-
|
||||
name: Delete old contributors-update branch
|
||||
- name: Delete old contributors-update branch
|
||||
uses: dawidd6/action-delete-branch@v3
|
||||
with:
|
||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||
branches: contributors-update
|
||||
|
||||
|
||||
add-contributors:
|
||||
runs-on: ubuntu-latest
|
||||
needs: delete-old-branch
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Create contributors-update branch
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create contributors-update branch
|
||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
branch: 'contributors-update'
|
||||
-
|
||||
name: Auto-add contributors
|
||||
|
||||
- name: Auto-add contributors
|
||||
uses: BobAnkh/add-contributors@v0.2.2
|
||||
with:
|
||||
BRANCH: 'contributors-update'
|
||||
|
|
14
.github/workflows/default_on_push.yml
vendored
14
.github/workflows/default_on_push.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
paths:
|
||||
- 'target/**'
|
||||
- '.dockerignore'
|
||||
- '.gitmodules'
|
||||
|
@ -22,9 +22,11 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
id: buildx
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
|
@ -32,6 +34,7 @@ jobs:
|
|||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
|
@ -45,6 +48,7 @@ jobs:
|
|||
load: true
|
||||
tags: mailserver-testing:ci
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Run test suite
|
||||
run: >
|
||||
NAME=mailserver-testing:ci
|
||||
|
@ -56,10 +60,12 @@ jobs:
|
|||
needs: build-and-test-image
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare tags
|
||||
id: prep
|
||||
uses: docker/metadata-action@v3.5.0
|
||||
|
@ -74,11 +80,14 @@ jobs:
|
|||
type=semver,pattern={{major}}.{{minor}}.{{patch}}
|
||||
flavor: |
|
||||
latest=auto
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.2.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
id: buildx
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
|
@ -86,17 +95,20 @@ jobs:
|
|||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build images locally
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
|
|
3
.github/workflows/linting.yml
vendored
3
.github/workflows/linting.yml
vendored
|
@ -20,16 +20,19 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Hadolint
|
||||
run: |
|
||||
make hadolint
|
||||
env:
|
||||
HADOLINT_VERSION: 2.4.1
|
||||
|
||||
- name: ShellCheck
|
||||
run: |
|
||||
make shellcheck
|
||||
env:
|
||||
SHELLCHECK_VERSION: 0.7.2
|
||||
|
||||
- name: ECLint
|
||||
run: |
|
||||
make eclint
|
||||
|
|
6
.github/workflows/scheduled_builds.yml
vendored
6
.github/workflows/scheduled_builds.yml
vendored
|
@ -12,6 +12,7 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare tags
|
||||
id: prep
|
||||
uses: docker/metadata-action@v3.5.0
|
||||
|
@ -21,22 +22,27 @@ jobs:
|
|||
${{ secrets.GHCR_REPOSITORY }}
|
||||
tags: |
|
||||
type=raw,value=edge
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.2.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
id: buildx
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build image locally
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
|
|
12
.github/workflows/test_merge_requests.yml
vendored
12
.github/workflows/test_merge_requests.yml
vendored
|
@ -1,9 +1,9 @@
|
|||
name: "Test Merge Requests"
|
||||
|
||||
on:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
paths:
|
||||
- 'target/**'
|
||||
- 'test/**'
|
||||
- '.dockerignore'
|
||||
|
@ -19,11 +19,14 @@ jobs:
|
|||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1.2.0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
id: buildx
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2.1.6
|
||||
with:
|
||||
|
@ -31,6 +34,7 @@ jobs:
|
|||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Build images locally
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
|
@ -43,6 +47,7 @@ jobs:
|
|||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
tags: mailserver-testing:ci
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
||||
- name: Build image for test suit
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
with:
|
||||
|
@ -56,9 +61,10 @@ jobs:
|
|||
load: true
|
||||
tags: mailserver-testing:ci
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
|
||||
- name: Run test suite
|
||||
run: >
|
||||
NAME=mailserver-testing:ci
|
||||
bash -c 'make generate-accounts tests'
|
||||
env:
|
||||
CI: true
|
||||
CI: true
|
||||
|
|
Loading…
Reference in a new issue