|
|
|
@ -30,7 +30,7 @@ on:
|
|
|
|
|
################################################
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build-test:
|
|
|
|
|
build-test-deploy:
|
|
|
|
|
name: build and test
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
@ -106,36 +106,7 @@ jobs:
|
|
|
|
|
MAILU_VERSION: ${{ env.BRANCH }}
|
|
|
|
|
TRAVIS_BRANCH: ${{ env.BRANCH }}
|
|
|
|
|
DOCKER_ORG: ${{ secrets.DOCKER_ORG }}
|
|
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
|
name: deploy step
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
needs:
|
|
|
|
|
- build-test
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: Extract branch name
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
|
|
|
|
|
- name: install python packages
|
|
|
|
|
run: python3 -m pip install -r tests/requirements.txt
|
|
|
|
|
- uses: satackey/action-docker-layer-caching@v0.0.11
|
|
|
|
|
# Ignore the failure of a step and avoid terminating the job.
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
- name: copy all certs
|
|
|
|
|
run: sudo -- sh -c 'mkdir -p /mailu && cp -r tests/certs /mailu && chmod 600 /mailu/certs/*'
|
|
|
|
|
- name: login docker
|
|
|
|
|
env:
|
|
|
|
|
DOCKER_UN: ${{ secrets.Docker_Login }}
|
|
|
|
|
DOCKER_PW: ${{ secrets.Docker_Password }}
|
|
|
|
|
run: echo "$DOCKER_PW" | docker login --username $DOCKER_UN --password-stdin
|
|
|
|
|
- name: build all docker images
|
|
|
|
|
run: docker-compose -f tests/build.yml build
|
|
|
|
|
env:
|
|
|
|
|
MAILU_VERSION: ${{ env.BRANCH }}
|
|
|
|
|
TRAVIS_BRANCH: ${{ env.BRANCH }}
|
|
|
|
|
DOCKER_ORG: ${{ secrets.DOCKER_ORG }}
|
|
|
|
|
|
|
|
|
|
- name: deploy built docker images
|
|
|
|
|
env:
|
|
|
|
|
DOCKER_UN: ${{ secrets.Docker_Login }}
|
|
|
|
@ -153,7 +124,7 @@ jobs:
|
|
|
|
|
#Returns true when none of the **previous** steps have failed or been canceled.
|
|
|
|
|
if: ${{ success() }}
|
|
|
|
|
needs:
|
|
|
|
|
- deploy
|
|
|
|
|
- build-test-deploy
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- name: CI/CD succeeded.
|
|
|
|
|