Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LISTEN=0.0.0.0:25
LISTEN_TLS=0.0.0.0:587
LISTEN_ADDR=0.0.0.0:25
LISTEN_ADDR_TLS=0.0.0.0:587
WEBHOOK_URL=http://localhost:8080/webhook
WEBHOOK_USER=
WEBHOOK_PASS=
Expand Down
46 changes: 45 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
build-and-upload:
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
BIN_NAME=inboundparse
if [ "${{ matrix.goos }}" = "windows" ]; then BIN_NAME="${BIN_NAME}.exe"; fi
mkdir -p dist
go build -trimpath -ldflags "-s -w" -o "dist/${BIN_NAME}-${{ matrix.goos }}-${{ matrix.goarch }}" ./
go build -trimpath -ldflags "-s -w" -o "dist/${BIN_NAME}-${{ matrix.goos }}-${{ matrix.goarch }}" ./cmd/inboundparse

- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
Expand Down Expand Up @@ -70,3 +71,46 @@ jobs:
files: assets/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-and-push-image:
name: Build and push Docker image (GHCR)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4.0.0

- name: Log in to GitHub Container Registry
uses: docker/login-action@v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker image name (GHCR requires lowercase)
id: image
run: echo "name=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"

- name: Docker metadata (tags and labels)
id: meta
uses: docker/metadata-action@v6.0.0
with:
images: ${{ steps.image.outputs.name }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable=true

- name: Build and push
uses: docker/build-push-action@v6.10
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build stage
# Official images publish 1.26.2-alpine / 1.26.2-alpine3.22+ — not alpine3.21.
FROM golang:1.26.2-alpine AS builder
# Official images publish 1.26.3-alpine / 1.26.3-alpine3.22+ — not alpine3.21.
FROM golang:1.26.3-alpine AS builder

WORKDIR /app

Expand Down
Loading
Loading