pediatric-ai-scribe-v3/.forgejo/workflows/docker-build.yml
Daniel f871384063
Some checks failed
Forgejo Android APK / Build signed APK (push) Has been cancelled
fix mobile assistant export and image actions
2026-05-10 20:28:46 +02:00

45 lines
1.4 KiB
YAML

name: Forgejo Docker Build
on:
workflow_dispatch:
inputs:
push_image:
description: Push image to Forgejo container registry
required: false
default: 'true'
jobs:
build:
name: Build Docker image
runs-on: forgejo-local
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare compose env files
run: |
touch .env
- name: Validate Compose config
run: docker compose -f docker-compose.yml config >/tmp/ped-ai-compose.yml
- name: Build compose service
run: docker compose -f docker-compose.yml build pediatric-scribe
- name: Tag image
run: |
IMAGE="git.danvics.com/danvics/pediatric-ai-scribe-v3"
SHORT_SHA=$(git rev-parse --short HEAD)
docker tag ped-ai-local:latest "$IMAGE:$SHORT_SHA"
docker tag ped-ai-local:latest "$IMAGE:latest"
- name: Push image to Forgejo registry
if: ${{ github.event.inputs.push_image != 'false' }}
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
IMAGE="git.danvics.com/danvics/pediatric-ai-scribe-v3"
SHORT_SHA=$(git rev-parse --short HEAD)
echo "$FORGEJO_TOKEN" | docker login git.danvics.com -u danvics --password-stdin
docker push "$IMAGE:$SHORT_SHA"
docker push "$IMAGE:latest"