Files
rocm-automated/.github/workflows/release.yml
2026-01-30 19:32:03 -05:00

237 lines
8.2 KiB
YAML

name: Release Build
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: true
type: string
create_release:
description: 'Create GitHub release'
required: true
default: true
type: boolean
env:
REGISTRY: docker.io
REGISTRY_USER: getterup
jobs:
validate-release:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate and extract version
id: version
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
else
VERSION="${{ github.ref_name }}"
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
# Check if this is a pre-release (contains alpha, beta, rc)
if [[ "$VERSION" =~ (alpha|beta|rc) ]]; then
echo "is_prerelease=true" >> $GITHUB_OUTPUT
else
echo "is_prerelease=false" >> $GITHUB_OUTPUT
fi
echo "📋 Release version: $VERSION"
echo "🚀 Pre-release: $([ "${{ steps.version.outputs.is_prerelease }}" == "true" ] && echo "Yes" || echo "No")"
build-release-images:
runs-on: ubuntu-latest
needs: validate-release
strategy:
matrix:
image:
- name: comfyui-rocm7.1
dockerfile: Dockerfile.comfyui-rocm7.1
- name: stable-diffusion.cpp-rocm7.1
dockerfile: Dockerfile.stable-diffusion.cpp-rocm7.1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_USER }}/${{ matrix.image.name }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ needs.validate-release.outputs.version }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !needs.validate-release.outputs.is_prerelease }}
- name: Build and push release image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfiles/${{ matrix.image.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ needs.validate-release.outputs.version }}
BUILD_DATE=${{ github.run_id }}
VCS_REF=${{ github.sha }}
build-gpu-variants:
runs-on: ubuntu-latest
needs: validate-release
strategy:
matrix:
gfx_arch: [gfx1150, gfx1151, gfx1200, gfx1100, gfx1101, gfx1030, gfx1201]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_USER }}/stable-diffusion-cpp-${{ matrix.gfx_arch }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ needs.validate-release.outputs.version }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push GPU variant
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfiles/Dockerfile.stable-diffusion.cpp-rocm7.1
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
build-args: |
GFX_ARCH=${{ matrix.gfx_arch }}
VERSION=${{ needs.validate-release.outputs.version }}
BUILD_DATE=${{ github.run_id }}
VCS_REF=${{ github.sha }}
create-release:
runs-on: ubuntu-latest
needs: [validate-release, build-release-images, build-gpu-variants]
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'true')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate release notes
id: release_notes
run: |
cat > release_notes.md << 'EOF'
## 🚀 ROCm 7.1 Container Release ${{ needs.validate-release.outputs.version }}
### 📦 Container Images Built
**Base Images:**
- `getterup/comfyui-rocm7.1:${{ needs.validate-release.outputs.version }}`
- `getterup/stable-diffusion.cpp-rocm7.1:${{ needs.validate-release.outputs.version }}`
**GPU-Specific Variants:**
- `getterup/stable-diffusion-cpp-gfx1150:${{ needs.validate-release.outputs.version }}` (RDNA 3.5 - Ryzen AI 9 HX 370)
- `getterup/stable-diffusion-cpp-gfx1151:${{ needs.validate-release.outputs.version }}` (RDNA 3.5 - Strix Point)
- `getterup/stable-diffusion-cpp-gfx1200:${{ needs.validate-release.outputs.version }}` (RDNA 4 - RX 9070 XT)
- `getterup/stable-diffusion-cpp-gfx1100:${{ needs.validate-release.outputs.version }}` (RDNA 3 - RX 7900 XTX/XT)
- `getterup/stable-diffusion-cpp-gfx1101:${{ needs.validate-release.outputs.version }}` (RDNA 3 - RX 7800/7700 XT)
- `getterup/stable-diffusion-cpp-gfx1030:${{ needs.validate-release.outputs.version }}` (RDNA 2 - RX 6000 series)
- `getterup/stable-diffusion-cpp-gfx1201:${{ needs.validate-release.outputs.version }}` (RDNA 4 - RX 9060/9070 XT)
### 🔧 Usage
```bash
# Quick start with docker-compose
git clone https://github.com/yourusername/rocm-automated.git
cd rocm-automated
docker-compose up -d
```
### 🛠️ What's Included
- ROCm 7.1 support for AMD GPUs
- Optimized ComfyUI for AI image generation
- Stable Diffusion.cpp with GPU acceleration
- Multi-GPU architecture support
- Docker Compose configuration for easy deployment
### 📋 System Requirements
- AMD GPU with ROCm support (RDNA 2/3/4)
- 16GB+ system RAM
- 8GB+ GPU VRAM for large models
- Linux with Docker 24.0+
### 🔗 Links
- [Docker Hub Repository](https://hub.docker.com/u/getterup)
- [Documentation](README.md)
- [Issues & Support](https://github.com/yourusername/rocm-automated/issues)
EOF
echo "📝 Release notes generated"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.validate-release.outputs.version }}
name: ROCm 7.1 Container Release ${{ needs.validate-release.outputs.version }}
body_path: release_notes.md
draft: false
prerelease: ${{ needs.validate-release.outputs.is_prerelease }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Docker Hub descriptions
run: |
echo "🐳 Consider updating Docker Hub repository descriptions with:"
echo "- Release version: ${{ needs.validate-release.outputs.version }}"
echo "- Build date: $(date -u +'%Y-%m-%d')"
echo "- Commit SHA: $(echo ${{ github.sha }} | cut -c1-7)"