Skip to content

#26: fix documentation image #105

#26: fix documentation image

#26: fix documentation image #105

name: Build & Push Docker images
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.list-targets.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: List targets
id: list-targets
uses: docker/bake-action/subaction/list-targets@v6
with:
target: build-all
bake:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
push: false
load: true
- name: Test (vt build)
run: |
TAG=${{ matrix.target }}
TAG=${TAG/-04/.04}
TAG=${TAG/3-16/3.16}
TAG=${TAG/11-2-2/11.2.2}
TAG=${TAG/11-4-3/11.4.3}
TAG=${TAG/12-2-0/12.2.0}
docker run \
--name test-container \
"lifflander1/vt:wf-$TAG" \
bash -c \
'git clone --depth=1 https://github.com/DARMA-tasking/vt /opt/vt && \
bash /opt/vt/ci/build_cpp.sh /opt/vt /opt/vt/build && \
bash /opt/vt/ci/test_cpp.sh /opt/vt /opt/vt/build && \
bash /opt/vt/ci/build_vt_sample.sh /opt/vt /opt/vt/build'
- name: Push
if: ${{ success() && github.ref == 'refs/heads/26-fix-documentation-image' }}
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}
push: true