Skip to content

Radiuss Tutorial 2024 - Kubernetes #18

Radiuss Tutorial 2024 - Kubernetes

Radiuss Tutorial 2024 - Kubernetes #18

name: Build containers for the Thicket Tutorial
on:
pull_request: []
workflow_dispatch:
jobs:
build-containers:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tutorial_name: ["radiuss-2024"]
registry_url_base: ["ghcr.io/llnl"]
container_info: [["thicket-tutorial-hub", "docker/Dockerfile.hub"],
["thicket-tutorial-init", "docker/Dockerfile.init"],
["thicket-tutorial-spawn", "docker/Dockerfile.spawn"]]
steps:
- name: Clone the thicket-tutorial repo
uses: actions/checkout@v4
- name: Clean unneeded stuff in runner to make space for the Docker image
uses: jlumbroso/[email protected]
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- name: GHCR Login
if: (github.event.name != 'pull_request')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull existing layers
env:
container: ${{ matrix.registry_url_base }}/${{ matrix.container_info[0] }}:${{ matrix.tutorial_name }}
run: |
docker pull ${container} || echo "${container} has not been pushed yet"
- name: Build Container
env:
container: ${{ matrix.registry_url_base }}/${{ matrix.container_info[0] }}:${{ matrix.tutorial_name }}
dockerfile: ${{ matrix.container_info[1] }}
run: |
docker build -f ${dockerfile} -t ${container} .
- name: Deploy Container
if: (github.event_name != 'pull_request')
env:
container: ${{ matrix.registry_url_base }}/${{ matrix.container_info[0] }}:${{ matrix.tutorial_name }}
run: docker push ${container}