ef7813f9f9
Build and Push Multi-Platform Images / build-and-push (push) Successful in 11s
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 <noreply@anthropic.com>
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
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"
|