Skip to content

Commit

Permalink
Provide a jammy env
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Feb 17, 2024
1 parent 425b0e2 commit 8ce28ae
Show file tree
Hide file tree
Showing 31 changed files with 301 additions and 321 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/debuntu_docker_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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/jammy', 'ubuntu/rolling', 'debian/oldstable', 'debian/unstable']
mpi: ['openmpi', 'mpich']
variant: ['mini', 'all', 'pdi']
runs-on: ubuntu-latest
steps:
- name: Free space
uses: jlumbroso/free-disk-space@main
with: { tool-cache: true }
- name: Login on GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup BuildX
uses: docker/setup-buildx-action@v3
- name: Compute tag, distro & version
id: info
run: |
echo "tags<<TAGS_LIST_EOF" >> "${GITHUB_OUTPUT}"
echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}" >> "${GITHUB_OUTPUT}"
echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${GITHUB_SHA:0:7}" >> "${GITHUB_OUTPUT}"
if [ 'true' = "${{ github.event_name == 'push' || github.event_name == 'schedule' }}" ]
then
echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
fi
echo "TAGS_LIST_EOF" >> "${GITHUB_OUTPUT}"
BASE="${{ matrix.base }}"
echo "distro=${BASE%/*}"
echo "distro=${BASE%/*}" >> "${GITHUB_OUTPUT}"
echo "distro_version=${BASE##*/}"
echo "distro_version=${BASE##*/}" >> "${GITHUB_OUTPUT}"
- name: Build and push
uses: docker/build-push-action@v5
with:
cache-from: "ghcr.io/pdidev/test_env/cache/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}"
cache-to: "ghcr.io/pdidev/test_env/cache/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}"
build-args: |
MPI=${{ matrix.mpi }}
DISTRO=${{ steps.info.outputs.distro }}
DISTRO_VERSION=${{ steps.info.outputs.distro_version }}
tags: |
${{ steps.info.outputs.tags }}
context: "{{defaultContext}}:debuntu/${{ matrix.variant }}"
push: true
Loading

0 comments on commit 8ce28ae

Please sign in to comment.