haiku.rag/.github/workflows/docker-publish-slim.yml
Yiorgis Gozadinos 9288519308
Update every GitHub Action to its latest major
All of them targeted Node 20, which the runners now force onto Node 24.
Two nested ones came along with their parents: actions/upload-artifact
inside upload-pages-artifact, and actions/github-script inside
codecov-action.

setup-uv v10 disables the cache under enable-cache: auto for release,
workflow_run and pull_request_target. Every job that caches passes
enable-cache: true explicitly, so none of them lose it.
2026-09-07 15:09:05 +03:00

55 lines
1.6 KiB
YAML

name: Build & publish Docker slim image
on:
workflow_run:
workflows: ["Build & publish haiku.rag-slim to pypi"]
types:
- completed
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
packages: write
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep -oP '^version = "\K[^"]+' haiku_rag_slim/pyproject.toml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build and push Docker slim image
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile.slim
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/ggozad/haiku.rag-slim:${{ steps.version.outputs.version }}
ghcr.io/ggozad/haiku.rag-slim:latest