Debuntu images #165
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: Debuntu images | |
on: | |
schedule: [ { cron: "50 23 * * 0" } ] # run every Sunday 23h50 | |
push: { branches: [ main, 'v*' ] } | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
debuntu: | |
strategy: | |
fail-fast: false | |
matrix: | |
base: ['ubuntu/focal', 'ubuntu/rolling', 'debian/bookworm', 'debian/unstable'] | |
mpi: ['openmpi', 'mpich'] | |
variant: ['mini', 'all', 'pdi'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Compute tags, distro & version | |
id: info | |
run: | | |
if [ 'true' = "${{ github.event_name == 'push' || github.event_name == 'schedule' }}" ] | |
then | |
echo "tags=ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{ github.ref_name }}" >> "${GITHUB_OUTPUT}" | |
fi | |
BASE="${{ matrix.base }}" | |
echo "distro=${BASE%/*}" >> "${GITHUB_OUTPUT}" | |
echo "distro_version=${BASE##*/}" >> "${GITHUB_OUTPUT}" | |
- name: "Build and push" | |
uses: pdidev/test_env/.github/actions/build@v3 | |
with: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
path: debuntu/${{ matrix.variant }} | |
image-name: ${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }} | |
test: "${{ matrix.variant != 'pdi' }}" # should be true, except for "pdi" variant | |
build-args: | | |
MPI=${{ matrix.mpi }} | |
DISTRO=${{ steps.info.outputs.distro }} | |
DISTRO_VERSION=${{ steps.info.outputs.distro_version }} | |
tags: | | |
${{ steps.info.outputs.tags }} |