Skip to content

Build & publish images through GHA #17

Build & publish images through GHA

Build & publish images through GHA #17

Workflow file for this run

name: Docker build
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 1 * * *" # Daily “At 01:00” UTC
workflow_dispatch:
env:
push: ${{ github.repository == 'rapidsai/dask-build-environment' && contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) }}
OLD_RAPIDS_VER: "24.10"
OLD_UCX_PY_VER: "0.40"
RAPIDS_VER: "24.12"
UCX_PY_VER: "0.41"
jobs:
docker:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: ["linux/amd64"]
cuda: ["11.8.0"]
python: ["3.10", "3.11", "3.12"]
linux: ["ubuntu20.04"]
rapids: ${{ fromJSON('["$OLD_RAPIDS_VER", "$RAPIDS_VER"]') }}
image:
- tag: "rapidsai/dask"
context: "./dask"
- tag: "rapidsai/distributed"
context: "./distributed"
- tag: "rapidsai/dask_image"
context: "./dask_image"
# dask-image gpuCI isn't dependent on RAPIDS
exclude:
- image:
tag: "rapidsai/dask_image"
rapids: ${{ env.OLD_RAPIDS_VER }}

Check failure on line 42 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Docker build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 42, Col: 21): Unrecognized named-value: 'env'. Located at position 1 within expression: env.OLD_RAPIDS_VER
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ env.push == 'true' }}
with:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN }}
- name: Generate tag
id: tag
env:
cuda: ${{ matrix.cuda }}
python: ${{ matrix.python }}
linux: ${{ matrix.linux }}
rapids: ${{ matrix.rapids }}
image: ${{ matrix.image.tag }}
run: |
case ${image} in
"rapidsai/dask_image") # doesn't depend on RAPIDS / ucx-py for gpuCI
tag="${image}:cuda${cuda}-devel-${linux}-py${python}"
;;
*)
tag="${image}:${rapids}-cuda${cuda}-devel-${linux}-py${python}"
;;
esac
echo "tag=${tag}" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.image.context }}
push: ${{ env.push == 'true' }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.tag.outputs.tag }}
build-args: |
RAPIDS_VER=${{ matrix.rapids }}
UCX_PY_VER=${{ matrix.rapids == env.OLD_RAPIDS_VER && env.OLD_UCX_PY_VER || env.UCX_PY_VER }}
CUDA_VER=${{ matrix.cuda }}
LINUX_VER=${{ matrix.linux }}
PYTHON_VER=${{ matrix.python }}
- name: Report
run: echo "Built image '${{ steps.tag.outputs.tag }}'"