Skip to content

Commit 9d389da

Browse files
authored
workflows: Push PETSc/Devito docker image to Docker Hub (#71)
1 parent 6cdb7d0 commit 9d389da

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/pytest-petsc.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,20 @@ jobs:
4646
- name: Checkout devito
4747
uses: actions/checkout@v4
4848

49+
- name: Log in to DockerHub
50+
uses: docker/login-action@v2
51+
with:
52+
username: ${{ secrets.DOCKER_USERNAME }}
53+
password: ${{ secrets.DOCKER_PASSWORD }}
54+
4955
- name: Build docker image
5056
run: |
5157
docker build . --file docker/Dockerfile.devito --tag devito_img --build-arg base=zoeleibowitz/bases:cpu-${{ matrix.arch }} --build-arg petscinstall=petsc
58+
docker tag devito_img ${{ secrets.DOCKER_USERNAME }}/devito_img:latest
59+
60+
- name: Push Docker image to DockerHub
61+
run: |
62+
docker push ${{ secrets.DOCKER_USERNAME }}/devito_img:latest
5263
5364
- name: Set run prefix
5465
run: |

devito/mpi/distributed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def devito_mpi_finalize():
9191
"""
9292
Finalize MPI, if initialized by Devito.
9393
"""
94-
global init_by_devito # noqa
94+
global init_by_devito # noqa: F824
9595
if init_by_devito and MPI.Is_initialized() and not MPI.Is_finalized():
9696
MPI.Finalize()
9797

0 commit comments

Comments
 (0)