Skip to content

doc: add links to badges #15

doc: add links to badges

doc: add links to badges #15

Workflow file for this run

name: build-latest
on:
workflow_dispatch:
push:
paths-ignore:
- LICENSE
- docker-compose.yml
branches:
- "*"
jobs:
build-push-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # caching pip dependencies
- name: Start test containers
run: docker compose --env-file .env.test -f test/docker-compose.yml up -d --build
- name: Install test environment
run: pip install -r test/requirements.txt
- name: Run tests
run: pytest -vv test/test_mailpit.py
- name: Stop test containers
if: always()
run: docker compose --env-file .env.test -f test/docker-compose.yml down --volumes
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' }}
cache-from: type=gha,ref=dcagatay/emailrelay
cache-to: type=gha,ref=dcagatay/emailrelay,mode=max
tags: dcagatay/emailrelay:latest
- name: Update repo description
uses: peter-evans/dockerhub-description@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: dcagatay/emailrelay