Skip to content

Commit

Permalink
Fix: Formatting and layout, update pull_request GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Jun 4, 2021
1 parent 9a444d4 commit 3ec47a1
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker image

on:
push:
branches: master
branches: [ 'master' ]

jobs:
buildx:
Expand Down Expand Up @@ -72,8 +72,8 @@ jobs:
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ hashFiles('**/Dockerfile') }}
#key: ${{ runner.os }}-single-buildx-${{ github.sha }}
#key: ${{ runner.os }}-single-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx-
Expand Down
97 changes: 84 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,98 @@ name: Validate pull request

on:
pull_request:
branches: master
branches: [ 'master' ]

jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2










- name: Get release version
id: version_number
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
echo "::set-output name=RELEASE_VERSION::${GITHUB_REF:10}"
- name: Run unit tests
run: ./unit-tests.sh
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v3.3.1
with:
buildx-version: latest

- name: Run integration tests
run: ./integration-tests.sh
shell: bash
env: # Or as an environment variable
XOAUTH2_RELAYHOST_USERNAME: ${{ secrets.XOAUTH2_RELAYHOST_USERNAME }}
XOAUTH2_CLIENT_ID: ${{ secrets.XOAUTH2_CLIENT_ID }}
XOAUTH2_SECRET: ${{ secrets.XOAUTH2_SECRET }}
XOAUTH2_INITIAL_REFRESH_TOKEN: ${{ secrets.XOAUTH2_INITIAL_REFRESH_TOKEN }}
run: |
echo "RELAYHOST_USERNAME=${XOAUTH2_RELAYHOST_USERNAME}" > integration-tests/xoauth2/.env
echo "FROM=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "TO=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_CLIENT_ID=${XOAUTH2_CLIENT_ID}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_SECRET=${XOAUTH2_SECRET}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_INITIAL_REFRESH_TOKEN=${XOAUTH2_INITIAL_REFRESH_TOKEN}" >> integration-tests/xoauth2/.env
cp integration-tests/xoauth2/.env integration-tests/xoauth2-error/.env
./integration-tests.sh
- name: Run HELM chart tests
run: ./helm/tests.sh
- name: Run Buildx
env:
PLATFORMS: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
run: ./build.sh -t boky/postfix

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true

- name: Builder info
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-single-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx-
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
update-binfmts --enable
- name: Build Alpine
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: |
boky/postfix:latest
boky/postfix:latest-alpine
platforms: "linux/amd64" # linux/s390x: "rsyslog (no such package)"
cache-from: type=local,src=/tmp/.buildx-cache/alpine

build-args: |
BASE_IMAGE=alpine:latest
4 changes: 2 additions & 2 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ hashFiles('**/Dockerfile') }}
#key: ${{ runner.os }}-single-buildx-${{ github.sha }}
#key: ${{ runner.os }}-single-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx-
Expand Down
2 changes: 1 addition & 1 deletion helm/mail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ persistence:
size: 1Gi
storageClass: ""


readinessProbe:
initialDelaySeconds: 10
periodSeconds: 60
Expand All @@ -134,6 +133,7 @@ livenessProbe:
- >-
ps axf | fgrep -v grep | egrep -q '\{supervisord\}|/usr/bin/supervisord' &&
ps axf | fgrep -v grep | egrep -q '(/usr/lib/postfix/sbin/|/usr/libexec/postfix/)master'
startupProbe:
initialDelaySeconds: 5
periodSeconds: 5
Expand Down

0 comments on commit 3ec47a1

Please sign in to comment.