From c31a62d2f68b124371ae95444b7e34143426b232 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+aendeavor@users.noreply.github.com> Date: Sat, 16 Jan 2021 15:34:31 +0100 Subject: [PATCH] fixes the PR testing problems --- .github/workflows/close_stale_issues.yml | 2 +- .github/workflows/default_on_push.yml | 6 +-- .github/workflows/linting.yml | 2 +- .github/workflows/scheduled_builds.yml | 2 +- .github/workflows/test_merge_requests.yml | 59 ++++++++--------------- README.md | 8 +-- 6 files changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/workflows/close_stale_issues.yml b/.github/workflows/close_stale_issues.yml index 761bf475..c0dcb36f 100644 --- a/.github/workflows/close_stale_issues.yml +++ b/.github/workflows/close_stale_issues.yml @@ -6,7 +6,7 @@ on: jobs: stale: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/stale@v3 with: diff --git a/.github/workflows/default_on_push.yml b/.github/workflows/default_on_push.yml index a1ae4a2c..cd7fc031 100644 --- a/.github/workflows/default_on_push.yml +++ b/.github/workflows/default_on_push.yml @@ -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 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f91d662c..275eb053 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -8,7 +8,7 @@ on: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/scheduled_builds.yml b/.github/workflows/scheduled_builds.yml index e1089a95..9fb5a537 100644 --- a/.github/workflows/scheduled_builds.yml +++ b/.github/workflows/scheduled_builds.yml @@ -6,7 +6,7 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test_merge_requests.yml b/.github/workflows/test_merge_requests.yml index d508c5f4..e9ae9dbd 100644 --- a/.github/workflows/test_merge_requests.yml +++ b/.github/workflows/test_merge_requests.yml @@ -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 diff --git a/README.md b/README.md index 11a40428..54381177 100644 --- a/README.md +++ b/README.md @@ -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 ```