Skip to content

Use docker actions

Use docker actions #5

Workflow file for this run

name: Base Docker images for building
on:
push:
paths: [ 'docker/*', '.github/workflows/base-images.yml' ]
pull_request:
branches: [ main ]
paths: [ 'docker/*', '.github/workflows/base-images.yml' ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cuda-linux:
strategy:
matrix:
cuda_version: ["12", "11"]
runs-on: ubuntu-latest
steps:
# Check out code
- uses: actions/checkout@v4
# Set up build
- name: Set up Docker multiarch
uses: docker/setup-qemu-action@v2
- name: Log in to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Build Docker image
- name: Build Docker image
run: |
set -ex
docker buildx create --use
docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg repo_name=${{ github.repository }} -t ghcr.io/${{ github.repository }}/cuda-linux:${{ matrix.cuda_version }} -f docker/cuda${{ matrix.cuda_version }}-linux.Dockerfile docker