Files
lt-auth-proxy/.gitea/workflows/build-docker.yml
Max P. b6e0947c3c feat(ci): add automated workflows for releases and Docker builds
- Introduce auto-changelog and release workflow for version management
- Add Docker workflows for nightly and release image builds
- Include scripts for release ID retrieval and asset uploads
- Document release process and best practices in `.gitea` directory
2025-05-11 01:10:10 +02:00

60 lines
1.8 KiB
YAML

name: Build and upload Docker nightly image
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- 'CHANGELOG.md'
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore Docker cache
uses: https://git.0xmax42.io/actions/cache@v1
with:
key: buildx-general
paths: |
/tmp/.buildx-cache
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
install: true
- name: Login to Gitea Docker Registry
env:
REGISTRY: git.0xmax42.io
USERNAME: ${{ secrets.PACKAGE_USER }}
PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
run: |
echo "$PASSWORD" | docker login $REGISTRY --username "$USERNAME" --password-stdin
- name: Build Docker Image
run: |
CREATED=$(date -u +%Y-%m-%dT%H:%M:%SZ)
VERSION_TAG=nightly-$(date +%Y%m%d)
docker buildx build \
--tag git.0xmax42.io/simdev/lt-auth-proxy:nightly \
--platform linux/amd64,linux/arm64 \
--label org.opencontainers.image.description="Lightweight LanguageTool Auth Proxy" \
--label org.opencontainers.image.documentation="https://git.0xmax42.io/maxp/lt-auth-proxy" \
--label org.opencontainers.image.authors="0xMax42 <mail@0xmax42.io>" \
--label org.opencontainers.image.created=$CREATED \
--label org.opencontainers.image.version=$VERSION_TAG \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \
--builder ${{ steps.buildx.outputs.name }} \
--push \
--progress=plain \
.