add: flux radiuss tutorial 2024 #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build containers flux-tutorials | |
on: | |
pull_request: [] | |
workflow_dispatch: | |
jobs: | |
build-containers: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
test: [["2024-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.hub", "ghcr.io/flux-framework/flux-jupyter-hub:radiuss-2024"], | |
["2024-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.init", "ghcr.io/flux-framework/flux-jupyter-init:radiuss-2024"], | |
["2024-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.spawn", "ghcr.io/flux-framework/flux-jupyter-spawn:radiuss-2024"]] | |
# Tutorials are over - these builds are disabled | |
# ["2023-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.hub", "ghcr.io/flux-framework/flux-jupyter-hub:2023"], | |
# ["2023-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.init", "ghcr.io/flux-framework/flux-jupyter-init:2023"], | |
# ["2023-RADIUSS-AWS/JupyterNotebook", "docker/Dockerfile.spawn", "ghcr.io/flux-framework/flux-jupyter-spawn:2023"]] | |
# ["2024-RIKEN-AWS/JupyterNotebook", "docker/Dockerfile.hub", "ghcr.io/flux-framework/flux-jupyter-hub:riken-2024"], | |
# ["2024-RIKEN-AWS/JupyterNotebook", "docker/Dockerfile.init", "ghcr.io/flux-framework/flux-jupyter-init:riken-2024"], | |
# ["2024-RIKEN-AWS/JupyterNotebook", "docker/Dockerfile.spawn", "ghcr.io/flux-framework/flux-jupyter-spawn:riken-2024"]] | |
steps: | |
- name: Clone the code | |
uses: actions/checkout@v3 | |
# Note: only works on Ubuntu runner | |
- name: Remove unneeded stuff in runner to make space for 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@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pull Layers (if exist) | |
env: | |
container: ${{ matrix.test[2] }} | |
run: docker pull ${container} || echo "${container} not pushed yet" | |
- name: Build Container | |
env: | |
context: ${{ matrix.test[0] }} | |
dockerfile: ${{ matrix.test[1] }} | |
container: ${{ matrix.test[2] }} | |
run: | | |
cd ${context} | |
docker build -f ${dockerfile} -t ${container} . | |
- name: Deploy Container | |
if: (github.event_name != 'pull_request') | |
env: | |
container: ${{ matrix.test[2] }} | |
run: docker push ${container} |