From c8019bdc0ece41e8af65c439f0d76693cc1a3783 Mon Sep 17 00:00:00 2001 From: Donato Capitella Date: Wed, 6 Aug 2025 09:43:56 +0100 Subject: [PATCH] Attempt to fix build pipeline --- .github/workflows/build_and_publish.yml | 51 ++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 1cfadf3..655f045 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -1,12 +1,14 @@ -name: Build & Push AMD Strix Halo Toolboxes +# File: .github/workflows/build_and_publish.yml +name: Build & Publish AMD Strix Halo Toolboxes on: workflow_dispatch: inputs: backends: - description: | - Comma-separated list of backends to build (e.g. "rocm-7beta,rocm-7rc"). - Use "all" to build everything. + description: > + Comma-separated list of backends to build + (e.g. "rocm-7beta,rocm-7rc"). + Use `all` to build everything. required: false default: all @@ -20,20 +22,17 @@ jobs: strategy: fail-fast: false matrix: - # if inputs.backends == "all", expand to the full list - # otherwise split the comma list into an array - backend: ${{ fromJSON( - github.event.inputs.backends == 'all' + backend: ${{ fromJson( + inputs.backends == 'all' ? '["rocm-6.4.2","rocm-7beta","rocm-7rc","vulkan-amdvlk","vulkan-radv"]' : format( - '[\"{}\"]', - replace(github.event.inputs.backends, ',', '\",\"') + '[\"{0}\"]', + replace(inputs.backends, ',', '\",\"') ) ) }} steps: - - name: Check out repository - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - name: Log in to Docker Hub uses: docker/login-action@v2 @@ -49,20 +48,20 @@ jobs: run: | set -euo pipefail - BACKEND="${{ matrix.backend }}" - DF="Dockerfile.${BACKEND}" - LOCAL_IMAGE="${LOCAL_PREFIX}-${BACKEND}" - BUILD_TAG="${BACKEND}_${BUILD_TS}" - IMMUTABLE_REF="${DOCKERHUB_REPO}:${BUILD_TAG}" - CHANNEL_REF="${DOCKERHUB_REPO}:${BACKEND}" + B="${{ matrix.backend }}" + DF="Dockerfile.$B" + LI="${LOCAL_PREFIX}-$B" + TAG="${B}_${BUILD_TS}" + IMM="${DOCKERHUB_REPO}:$TAG" + CHAN="${DOCKERHUB_REPO}:$B" - echo "→ Building ${DF}" - docker build --no-cache -t "${LOCAL_IMAGE}" -f "${DF}" . + echo "→ Building $DF" + docker build --no-cache -t "$LI" -f "$DF" . - echo "→ Tag & push immutable → ${IMMUTABLE_REF}" - docker tag "${LOCAL_IMAGE}" "${IMMUTABLE_REF}" - docker push "${IMMUTABLE_REF}" + echo "→ Pushing immutable → $IMM" + docker tag "$LI" "$IMM" + docker push "$IMM" - echo "→ Tag & push channel → ${CHANNEL_REF}" - docker tag "${IMMUTABLE_REF}" "${CHANNEL_REF}" - docker push "${CHANNEL_REF}" + echo "→ Updating channel → $CHAN" + docker tag "$IMM" "$CHAN" + docker push "$CHAN"