Files
docker-postfix/.gitea/workflows/docker-build.yml
T
Ketan Patel 2a9a7c6baa
Build and Push Docker Image / build (push) Successful in 1m52s
Merge newer Postfix implementation into Gitea and update Alpine
2026-10-02 23:51:09 -04:00

55 lines
1.5 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches: [main]
schedule:
- cron: '0 0 1 * *' # Monthly on the first day, at midnight UTC.
workflow_dispatch:
jobs:
build:
runs-on: kube
if: github.ref == 'refs/heads/main'
env:
DOCKER_BUILD_RECORD_UPLOAD: 'false'
DOCKER_BUILD_SUMMARY: 'false'
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
with:
persist-credentials: false
- name: Install Docker CLI
run: |
apt-get update
apt-get install -y --no-install-recommends docker.io
rm -rf /var/lib/apt/lists/*
- name: Log in to Docker Hub
uses: https://github.com/docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up temporary builder
uses: https://github.com/docker/setup-buildx-action@v3
with:
driver: docker-container
cache-binary: false
keep-state: false
cleanup: true
- name: Build and push to Docker Hub
uses: https://github.com/docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
pull: true
push: true
load: false
tags: docker.io/k2patel/postfix:latest
labels: |
org.opencontainers.image.source=https://git.k2patel.in/k2patel/docker-postfix
org.opencontainers.image.revision=${{ github.sha }}