CI Image Build #86
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: RRTMGP Base Images Build | |
run-name: CI Image Build | |
on: [push] | |
jobs: | |
docker: | |
strategy: | |
matrix: | |
toolchain: [oneapi, nvhpc] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build minimal-toolchain:${{ matrix.toolchain }} | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile-${{ matrix.toolchain }}-minimal | |
tags: minimal-toolchain:${{ matrix.toolchain }} | |
- name: Build add-netcdf:${{ matrix.toolchain }} | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile-add-netcdf | |
build-args: TOOLCHAIN=${{ matrix.toolchain }} | |
tags: add-netcdf:${{ matrix.toolchain }} | |
- name: Build add-python:${{ matrix.toolchain }} | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile-add-python | |
build-args: TOOLCHAIN=${{ matrix.toolchain }} | |
tags: add-python:${{ matrix.toolchain }} | |
- name: Log in to Docker Hub | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Log in to the Container registry | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push rte-rrtmgp-ci:${{ matrix.toolchain }} | |
uses: docker/build-push-action@v6 | |
with: | |
file: Dockerfile-finalize | |
build-args: TOOLCHAIN=${{ matrix.toolchain }} | |
push: ${{ github.ref == 'refs/heads/main' }} | |
tags: | | |
earthsystemradiation/rte-rrtmgp-ci:${{ matrix.toolchain }} | |
ghcr.io/earth-system-radiation/rte-rrtmgp-ci:${{ matrix.toolchain }} |