Files
amd-strix-halo-toolboxes/.github/workflows/build_and_publish.yml
T
Workflow config file is invalid. Please check your config file: model.ReadWorkflow: yaml: line 25: did not find expected key
2025-08-06 09:46:49 +01:00

69 lines
1.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build & Publish AMD Strix Halo Toolboxes
# 🔒 Manualonly trigger with a “backends” input
on:
workflow_dispatch:
inputs:
backends:
description: >
Comma-separated list of backends to build
(e.g. "rocm-7beta,rocm-7rc").
Use "all" to build the full matrix.
required: false
default: all
env:
DOCKERHUB_REPO: docker.io/kyuz0/amd-strix-halo-toolboxes
LOCAL_PREFIX: llama
jobs:
build-and-push:
name: Build & Push ${{ matrix.backend }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: ${{ fromJson(
inputs.backends == 'all'
? '["rocm-6.4.2","rocm-7beta","rocm-7rc","vulkan-amdvlk","vulkan-radv"]'
: format(
'[\"{0}\"]',
replace(inputs.backends, ',', '\",\"')
)
) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set timestamp
run: echo "BUILD_TS=$(date +%Y%m%dT%H%M%S)" >> $GITHUB_ENV
- name: Build & push ${{ matrix.backend }}
working-directory: toolboxes
run: |
set -euo pipefail
B="${{ matrix.backend }}"
DF="Dockerfile.$B"
LI="${LOCAL_PREFIX}-$B"
TAG="${B}_${BUILD_TS}"
IMM_REF="${DOCKERHUB_REPO}:$TAG"
CH_REF="${DOCKERHUB_REPO}:$B"
echo "→ Building $DF"
docker build --no-cache -t "$LI" -f "$DF" .
echo "→ Pushing immutable → $IMM_REF"
docker tag "$LI" "$IMM_REF"
docker push "$IMM_REF"
echo "→ Updating channel → $CH_REF"
docker tag "$IMM_REF" "$CH_REF"
docker push "$CH_REF"