Skip to content

Update latest Docker image #217

Update latest Docker image

Update latest Docker image #217

name: Update latest Docker image
on:
push:
branches:
- main
schedule:
- cron: "0 7 * * 1"
jobs:
docker-images:
name: Build and publish docker images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Images with FEniCSx
- name: Build and push Docker image with FEniCSx
uses: docker/build-push-action@v2
with:
push: true
tags: bempp/bempp-cl-with-dolfinx:latest
target: with-dolfinx
- name: Build and push notebook Docker image with FEniCSx
uses: docker/build-push-action@v2
with:
push: true
tags: bempp/cl-notebook:latest
target: lab
# Notebook with Numba only
- name: Build and push Numba-only notebook Docker image
uses: docker/build-push-action@v2
with:
push: true
tags: bempp/cl-notebook-numba:latest
target: numba-lab
upload-notebooks:
permissions:
id-token: write
contents: write
name: Generate and upload example notebooks
runs-on: ubuntu-latest
container: bempp/cl-dev-env-with-dolfinx-numba
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate notebooks
run: |
python3 -m pip install .
python3 -m pip install jupytext nbconvert ipykernel matplotlib
python3 examples/generate_notebooks.py --skip "dirichlet_weak_imposition,simple_helmholtz_fem_bem_coupling_dolfin,opencl_benchmark"
- name: Push to GitHub
run: |
cd examples/notebooks
git init
git checkout -b notebooks
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Notebook examples"
git remote add origin https://oauth2:${{ secrets.GITHUB_TOKEN }}@github.com/bempp/bempp-cl.git
git push -u origin notebooks --force