Skip to content

Build and push access-nri/build images #40

Build and push access-nri/build images

Build and push access-nri/build images #40

name: Build and push access-nri/build images
on:
workflow_dispatch:
inputs:
spack-packages-version:
required: true
type: string
default: "main"
description: "Either a git tag or branch name for the ACCESS-NRI/spack_packages repository, which defaults to the main branch"
jobs:
build-and-push-image:
strategy:
matrix:
package: [
"oasis3-mct",
"libaccessom2",
"access-om3",
"mom5",
"cice5",
]
compiler: [
{
name: "intel",
package: "intel-oneapi-compilers",
version: "2021.1.2",
},
]
uses: access-nri/workflows/.github/workflows/build-and-push-image.yml@main
with:
container-registry: ghcr.io
container-name: access-nri/build-${{ matrix.package }}-${{ matrix.compiler.name }}${{ matrix.compiler.version }}-${{ github.event.inputs.spack-packages-version }}
dockerfile-directory: containers
dockerfile-name: Dockerfile.build
build-args: |
# TODO: Probably shouldn't hard code base image path
"BASE_IMAGE=ghcr.io/access-nri/base-spack-${{ github.event.inputs.spack-packages-version }}:latest"
"PACKAGE=${{ matrix.package }}"
"COMPILER_NAME=${{ matrix.compiler.name}}"
"COMPILER_PACKAGE=${{ matrix.compiler.package}}"
"COMPILER_VERSION=${{ matrix.compiler.version}}"
permissions:
contents: read
packages: write