Skip to content

Docker Build

Docker Build #12

Workflow file for this run

name: Docker Build
on:
workflow_dispatch:
inputs:
target:
type: choice
description: Build Target
options:
- compiled
- base
env:
REGISTRY: ghcr.io
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: print mode
run: |
echo "Mode: ${{ github.event.inputs.target }}" >> $GITHUB_STEP_SUMMARY
- name: Checkout
uses: actions/checkout@v3
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Base Image
if: github.event.inputs.target == 'base'
uses: docker/build-push-action@v5
with:
push: true
build-args: |
MODE=base
IMAGE=nvidia/cuda:11.8.0-devel-ubuntu22.04
tags: ${{ env.REGISTRY }}/${{ github.repository }}-base:latest
- name: Build Compiled Image
if: github.event.inputs.target == 'compiled'
uses: docker/build-push-action@v5
with:
push: true
build-args: |
MODE=compiled
IMAGE=ghcr.io/st-tech/ppf-contact-solver-base:latest
tags: ${{ env.REGISTRY }}/${{ github.repository }}-compiled:latest