Add Gitea Actions workflow and platform/deploy doc updates
Some checks failed
Docker build and push / build-and-push (push) Has been cancelled

- Add .gitea/workflows/docker-build-push.yaml: build api/admin/upload on push to main
- Build script: build for linux/amd64 by default (PLATFORM), doc PLATFORM=linux/arm64
- Deploy README: Option A Gitea Actions, Option B manual; proxy timeout troubleshooting

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-03 15:36:19 +01:00
parent da64e52816
commit 6f5fd2a564
3 changed files with 106 additions and 4 deletions

View File

@@ -0,0 +1,80 @@
# Build and push Docker images to Gitea registry on push to main.
# Requires: Repository Actions enabled; secrets REGISTRY_USER and REGISTRY_TOKEN (PAT with package write);
# a runner with Docker (e.g. act_runner with Docker, or host Docker socket).
# Registry is assumed to be the same Gitea host; set REGISTRY in repo variables if different.
name: Docker build and push
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@v4
- name: Set version
id: version
run: |
VERSION=$(git describe --tags --always 2>/dev/null | sed 's/^v//' || echo "latest")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building with tag: $VERSION"
- name: Log in to Gitea container registry
env:
REGISTRY: ${{ vars.REGISTRY || '10.0.10.205:3000' }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
echo "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
- name: Build and push api
env:
REGISTRY: ${{ vars.REGISTRY || '10.0.10.205:3000' }}
OWNER: ${{ vars.REGISTRY_OWNER || 'bert.hausmans' }}
VERSION: ${{ steps.version.outputs.version }}
run: |
docker build --platform linux/amd64 \
-t "$REGISTRY/$OWNER/event-uploader-api:$VERSION" ./api
docker push "$REGISTRY/$OWNER/event-uploader-api:$VERSION"
if [ "$VERSION" != "latest" ]; then
docker tag "$REGISTRY/$OWNER/event-uploader-api:$VERSION" "$REGISTRY/$OWNER/event-uploader-api:latest"
docker push "$REGISTRY/$OWNER/event-uploader-api:latest"
fi
- name: Build and push admin
env:
REGISTRY: ${{ vars.REGISTRY || '10.0.10.205:3000' }}
OWNER: ${{ vars.REGISTRY_OWNER || 'bert.hausmans' }}
VERSION: ${{ steps.version.outputs.version }}
run: |
docker build --platform linux/amd64 \
-t "$REGISTRY/$OWNER/event-uploader-admin:$VERSION" ./admin
docker push "$REGISTRY/$OWNER/event-uploader-admin:$VERSION"
if [ "$VERSION" != "latest" ]; then
docker tag "$REGISTRY/$OWNER/event-uploader-admin:$VERSION" "$REGISTRY/$OWNER/event-uploader-admin:latest"
docker push "$REGISTRY/$OWNER/event-uploader-admin:latest"
fi
- name: Build and push upload
env:
REGISTRY: ${{ vars.REGISTRY || '10.0.10.205:3000' }}
OWNER: ${{ vars.REGISTRY_OWNER || 'bert.hausmans' }}
VERSION: ${{ steps.version.outputs.version }}
run: |
docker build --platform linux/amd64 \
-t "$REGISTRY/$OWNER/event-uploader-upload:$VERSION" ./upload
docker push "$REGISTRY/$OWNER/event-uploader-upload:$VERSION"
if [ "$VERSION" != "latest" ]; then
docker tag "$REGISTRY/$OWNER/event-uploader-upload:$VERSION" "$REGISTRY/$OWNER/event-uploader-upload:latest"
docker push "$REGISTRY/$OWNER/event-uploader-upload:latest"
fi
- name: Summary
run: |
echo "Images pushed with tag: ${{ steps.version.outputs.version }}"
echo "On Dockge: set TAG=${{ steps.version.outputs.version }} (or TAG=latest) and Pull + Redeploy."