Skip to content

Update Dockerfile

Update Dockerfile #192

Workflow file for this run

name: Build Docker
on:
push:
branches: [ "main" ]
tags:
- '**'
paths-ignore:
- '**.md'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- BASE_IMAGE: "ubuntu:22.04"
IMAGE_TAG_SUFFIX: ""
- BASE_IMAGE: "nvidia/cuda:12.4.1-devel-ubuntu22.04"
IMAGE_TAG_SUFFIX: "-cuda"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: "0"
- id: pre-step
shell: bash
run: echo "image-tag=$(git describe --tags --always)${{ matrix.IMAGE_TAG_SUFFIX }}" >> $GITHUB_OUTPUT
- name: Build & Publish Docker Image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}
buildargs: "BASE_IMAGE=${{ matrix.BASE_IMAGE }}"