Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-push-stable-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ jobs:
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/stable:latest
build-args: POREPY_BRANCH=main

24 changes: 10 additions & 14 deletions .github/workflows/build-test-stable-docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# but does not push the image to Docker Hub. It also runs only on pull requests to main,
# whereas push-stable-docker-image.yml runs on pushes (PRs accepted) to main.
#
# NOTE: For now, this workflow does not run as intended, since it will run on the branch
# defined by the stable Dockerfile, which is main. What is needed is to reconfigure
# the dockerfile and GH workflow to build from the PR branch instead. This should be
# revisited later.
# The stable Dockerfile accepts a POREPY_BRANCH build argument that controls which
# branch is checked out inside the container. Here we pass the PR's head branch so
# that the image is built and tested against the PR changes rather than main.
name: Build a Docker image for main branch PRs

on:
Expand All @@ -17,25 +16,22 @@ on:
- main

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
build_and_test:
name: Build Docker image (no push)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and push stable
- name: Build stable
uses: docker/build-push-action@v3
with:
context: ./
file: ./dockerfiles/stable/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: false
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/stable:latest
tags: porepy/stable:pr-test
build-args: POREPY_BRANCH=${{ github.head_ref || github.ref_name }}

8 changes: 6 additions & 2 deletions dockerfiles/stable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
# Use the base PorePy image; most of the heavy lifting is done from there.
FROM porepy/base

# Branch to check out. Defaults to main. Can be overridden at build time, e.g.,
# to build from a PR branch using --build-arg POREPY_BRANCH=<branch_name>.
ARG POREPY_BRANCH=main

## Download PorePy from github
# Make sure we are in the home directory
WORKDIR ${POREPY_HOME}
# Make sure we're on the main branch
RUN git checkout main && git pull
# Check out the specified branch (default: main)
RUN git fetch && git checkout ${POREPY_BRANCH} && git pull

# Run tests to check that everything works.
# NOTE: When run as a GH action (presumably after a PR to the develop branch
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
# Project information.
[project]
name = "porepy"
version = "1.12.0"
version = "1.13.0"
description = "Simulation tool for fractured and deformable porous media"
readme = "Readme.md"
license = { text = "GPL" }
Expand Down Expand Up @@ -48,7 +48,7 @@ development = [
"traitlets"
]
testing = [
"pytest >= 4.6",
"pytest",
"pytest-cov",
"pytest-runner"
]
Expand Down
2 changes: 1 addition & 1 deletion src/porepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import warnings


__version__ = "1.12.0"
__version__ = "1.13.0"

# Try to read the config file from the directory where python process was launched
try:
Expand Down
Loading