fixes the PR testing problems

This commit is contained in:
Georg Lauterbach 2021-01-16 15:34:31 +01:00
parent 614fbb4983
commit c31a62d2f6
No known key found for this signature in database
GPG key ID: 2FDC58699AF121C6
6 changed files with 30 additions and 49 deletions

View file

@ -6,7 +6,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/stale@v3
with:

View file

@ -6,7 +6,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
imagetag: ${{ steps.prep.outputs.imagetag }}
steps:
@ -54,7 +54,7 @@ jobs:
test:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
@ -68,7 +68,7 @@ jobs:
publish:
needs: test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -8,7 +8,7 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -6,7 +6,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -1,59 +1,40 @@
name: "Test Merge Requests"
on:
pull_request:
branches: [ "*" ]
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
outputs:
imagetag: ${{ steps.prep.outputs.imagetag }}
build-and-test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
-
name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=docker.io/mailserver/testing
TAGS="${DOCKER_IMAGE}:${GITHUB_SHA::8},${DOCKER_IMAGE}:latest"
echo ::set-output name=tags::${TAGS}
- name: Set up QEMU
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
id: buildx
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image locally
-
name: Build image locally
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
build-args: |
VCS_REF=${{ github.sha }}
VCS_VER=${{ github.ref }}
context: .
file: ./Dockerfile
load: true
platforms: linux/amd64
pull: true
push: true
tags: ${{ steps.prep.outputs.tags }}
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: run test suite
run: |
NAME=docker.io/mailserver/testing:${GITHUB_SHA::8} bash -c 'make generate-accounts tests'
tags: docker.io/mailserver/testing:ci
-
name: Run all tests
run: >
NAME=docker.io/mailserver/testing:ci
bash -c 'make generate-accounts tests'
env:
CI: true

View file

@ -66,10 +66,10 @@ A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.)
Download the `docker-compose.yml`, `compose.env`, `mailserver.env` and the `setup.sh` files:
``` BASH
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/stable/setup.sh
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/stable/docker-compose.yml
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/stable/mailserver.env
wget -O .env https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/stable/compose.env
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/docker-compose.yml
wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/mailserver.env
wget -O .env https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/compose.env
chmod a+x ./setup.sh
```