From ef7813f9f9d0a17724cfb2c54883da9a22eb6e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20P=C3=B6ttker?= Date: Tue, 16 Jun 2026 16:48:04 +0200 Subject: [PATCH] ci: add manual build workflow with custom image tag New workflow_dispatch workflow to build & push backend/frontend images with a manually chosen tag and service selection (both/backend/frontend). Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/manual-build.yml | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/manual-build.yml diff --git a/.gitea/workflows/manual-build.yml b/.gitea/workflows/manual-build.yml new file mode 100644 index 0000000..d9fb184 --- /dev/null +++ b/.gitea/workflows/manual-build.yml @@ -0,0 +1,53 @@ +name: Manual Build and Push (custom tag) + +on: + workflow_dispatch: + inputs: + tag: + description: "Container-Tag (z. B. stable, v1.2.3, hotfix)" + required: true + default: "stable" + service: + description: "Welche Images bauen?" + type: choice + required: true + default: "both" + options: + - both + - backend + - frontend + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Show selected inputs + run: | + echo "Tag: ${{ inputs.tag }}" + echo "Service: ${{ inputs.service }}" + echo "Ref: ${{ github.ref_name }}" + + - name: Login to Gitea Container Registry + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.poettker-cloud.de -u "${{ gitea.actor }}" --password-stdin + + - name: Build and Push Backend + if: ${{ inputs.service == 'both' || inputs.service == 'backend' }} + env: + TAG: ${{ inputs.tag }} + run: | + IMAGE="gitea.poettker-cloud.de/bjoernpoettker/paperlessmanager-backend:${TAG}" + docker build -t "$IMAGE" ./paperless-backend + docker push "$IMAGE" + + - name: Build and Push Frontend + if: ${{ inputs.service == 'both' || inputs.service == 'frontend' }} + env: + TAG: ${{ inputs.tag }} + run: | + IMAGE="gitea.poettker-cloud.de/bjoernpoettker/paperlessmanager-frontend:${TAG}" + docker build -t "$IMAGE" ./paperless-frontend + docker push "$IMAGE"