docker-llamafile/.gitea/workflows/gitea-ci.yaml

68 lines
1.5 KiB
YAML

name: Build and Deploy docker-llamafile
on: [push]
jobs:
# Environment/Checks
check-docker-state:
name: Check Docker State
runs-on: host
tags:
- live
steps:
- run: whoami
- run: uname -a
- run: /usr/bin/docker ps
- run: docker ps
# Version-Controll
git-llamafile:
# name: Checkout docker-llamafile
runs-on: host
tags:
- live
steps:
- run: apt install git || true
- run: (cd /root && git clone https://gitea.tidoni-sky.ddnss.de/tidoni/docker-llamafile.git || true)
- run: (cd /root/docker-llamafile && git pull)
# Build
bld-llamafile:
# name: Build docker-llamafile
runs-on: host
tags:
- live
needs: [ git-llamafile ]
if: |
always()
steps:
- run: (cd /root/docker-llamafile && docker build -t tidoni/llamafile:latest .)
# Deploy
push-llamafile:
# name: Deploy pdf-web-toolkit
runs-on: host
tags:
- live
needs: [ git-llamafile, bld-llamafile ]
if: |
always()
steps:
- run: docker push tidoni/llamafile:latest
# Deploy
dpy-llamafile:
# name: Deploy pdf-web-toolkit
runs-on: host
tags:
- live
needs: [ git-llamafile, bld-llamafile ]
if: |
always()
steps:
- run: docker stop llama || true
- run: docker rm llama || true
- run: docker run -d --name llama --restart unless-stopped -p 8102:8080 -t tidoni/llamafile:latest