Skip to content

v2.7.1

v2.7.1 #9

Workflow file for this run

# ─────────────────────────────────────────────────────────────────────
# Director-Class AI — Docker Image CI
# (C) 1998-2026 Miroslav Sotek. All rights reserved.
# ─────────────────────────────────────────────────────────────────────
name: Docker
on:
release:
types: [published]
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE: ghcr.io/${{ github.repository_owner }}/director-ai
jobs:
docker-cpu:
name: Build CPU Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.IMAGE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-gpu:
name: Build GPU Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.IMAGE }}
tags: |
type=semver,pattern={{version}},suffix=-gpu
type=raw,value=gpu
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: Dockerfile.gpu
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
discord-notify:
name: Discord Docker Notification
runs-on: ubuntu-latest
needs: [docker-cpu, docker-gpu]
if: always() && needs.docker-cpu.result == 'success'
steps:
- name: Post to Discord
if: env.DISCORD_WEBHOOK_URL != ''
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
curl -sf -H "Content-Type: application/json" -d "{
\"embeds\": [{
\"title\": \"Docker images published\",
\"color\": 3447003,
\"fields\": [
{\"name\": \"CPU\", \"value\": \"\`ghcr.io/anulum/director-ai:${VERSION}\`\\n\`ghcr.io/anulum/director-ai:latest\`\", \"inline\": true},
{\"name\": \"GPU\", \"value\": \"\`ghcr.io/anulum/director-ai:${VERSION}-gpu\`\\n\`ghcr.io/anulum/director-ai:gpu\`\", \"inline\": true},
{\"name\": \"Pull\", \"value\": \"\`\`\`\\ndocker pull ghcr.io/anulum/director-ai:latest\\n\`\`\`\", \"inline\": false}
],
\"footer\": {\"text\": \"${GITHUB_REPOSITORY}\", \"icon_url\": \"https://github.com/anulum.png\"},
\"timestamp\": \"${TIMESTAMP}\"
}]
}" "$DISCORD_WEBHOOK_URL"