Skip to content

Use docker actions

Use docker actions #7

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@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
uses: docker/build-push-action@v5
with:
context: docker
file: docker/cuda${{ matrix.cuda_version }}-linux.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
labels: |
org.opencontainers.image.source="https://github.com/${{ github.repository }}"
tags: |
ghcr.io/${{ github.repository }}/cuda-linux:${{ matrix.cuda_version }}