Skip to content

Commit 085746e

Browse files
committed
Fix: Try to fix building of postfix-exporter
1 parent 1bdf778 commit 085746e

File tree

5 files changed

+38
-6
lines changed

5 files changed

+38
-6
lines changed

.github/actions/build-postfix-exporter/action.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
description: 'Docker image tags'
1010
required: true
1111

12+
env:
13+
DOCKERHUB_REPO: boky/postfix-exporter
14+
#GHCR_REPO: ghcr.io/bokysan/postfix-exporter
15+
1216
runs:
1317
using: "composite"
1418
steps:
@@ -33,6 +37,22 @@ runs:
3337
with:
3438
DOCKER_ACCESS_TOKEN: '${{ inputs.DOCKER_ACCESS_TOKEN }}'
3539

40+
# GitHub container registry login
41+
#- name: Login to GHCR
42+
# uses: docker/login-action@v3
43+
# with:
44+
# registry: ghcr.io
45+
# username: ${{ github.repository_owner }}
46+
# password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Docker meta
49+
id: meta
50+
uses: docker/metadata-action@v5
51+
with:
52+
images: |
53+
${{ env.DOCKERHUB_REPO }}
54+
# ${{ env.GHCR_REPO }}
55+
3656
- name: Cache Docker layers
3757
uses: actions/cache@v4
3858
with:
@@ -42,11 +62,12 @@ runs:
4262
${{ runner.os }}-postfix-exporter-
4363
4464
- name: Build and push
45-
uses: docker/build-push-action@v5
65+
uses: docker/build-push-action@v6
4666
with:
4767
context: postfix_exporter
4868
push: true
4969
tags: '${{ inputs.tags }}'
70+
labels: ${{ steps.meta.outputs.labels }}
5071
platforms: "linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x"
5172
# linux/386,linux/arm/v6,linux/arm64,linux/riscv64"
5273
cache-from: type=local,src=/tmp/.buildx-cache/postfix-exporter,mode=max,compression=estargz

.github/actions/buildx-setup/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99

1010
- name: Set up Docker Buildx
1111
id: buildx
12-
uses: docker/setup-buildx-action@master
12+
uses: docker/setup-buildx-action@v3
1313
with:
1414
install: true
1515

.github/workflows/tags.yml

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
tags: |
5252
boky/postfix-exporter:latest
5353
boky/postfix-exporter:edge
54-
# boky/postfix-exporter:${{ env.RELEASE_VERSION }}
55-
# boky/postfix-exporter:${{ env.RELEASE_VERSION_NO_v }}
5654
5755
Build_Alpine:
5856
runs-on: ubuntu-latest

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Several potentially "surprising" changes went into this issue and hence warrant
131131
- **[`master`](https://github.com/bokysan/docker-postfix/tree/master/) branch now builds images called [`edge`](https://hub.docker.com/r/boky/postfix/tags?page=1&name=edge)**.
132132
`latest` images are built from the last tag. We've had several issues with people using the `latest` tag
133133
and reporting problems. You can now rely on `latest` being the latest stable release.
134-
- Image now builds its own version of [postfix-exporter](https://github.com/kumina/postfix_exporter) and relies on this
134+
- Image now builds its own version of [postfix-exporter](https://github.com/hsn723/postfix_exporter) and relies on this
135135
third-party project. Checkout is from master branch, based
136136
on specific SHA commit id. The same hash is used for master and tags.
137137
- **Architecture galore!** With the addition of debian images, we now support support more architectures than ever. The list includes:

scripts/healthcheck.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@ if [ -f /tmp/container_is_terminating ]; then
55
fi
66

77
check_postfix() {
8-
printf "EHLO healthcheck\nquit\n" | \
8+
local proxy_protocol="$(postconf postscreen_upstream_proxy_protocol | cut -f2- -d= | tr -d '[:blank:]')"
9+
10+
check_string="EHLO healthcheck\nquit\n"
11+
12+
if [ -n "$proxy_protocol" ]; then
13+
check_string="PROXY TCP4 127.0.0.1 127.0.0.1 587 587\n${check_string}"
14+
# ^--- proxied internet protocol and family
15+
# ^--- source address
16+
# ^--- destination address
17+
# ^--- source port
18+
# ^--- destination port
19+
fi
20+
21+
printf "${check_string}" | \
922
{ while read l ; do sleep 1; echo $l; done } | \
1023
nc -w 2 127.0.0.1 587 | \
1124
grep -qE "^220.*ESMTP Postfix"

0 commit comments

Comments
 (0)