Skip to content

Commit

Permalink
Try updating example paper workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Apr 30, 2024
1 parent 84cfe6a commit 9d2413c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build:
runs-on: ubuntu-22.04
container:
image: ghcr.io/scientificcomputing/fenics-gmsh:2023-08-16
image: ghcr.io/scientificcomputing/fenics-gmsh:2024-02-19

env:
# Directory that will be published on github pages
Expand All @@ -38,10 +38,9 @@ jobs:
- name: Build docs
run: jupyter book build -W .


- name: Cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand All @@ -57,7 +56,7 @@ jobs:
run: jupyter book build .

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.PUBLISH_DIR }}

Expand All @@ -78,7 +77,6 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3


- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
30 changes: 21 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
name: Create and publish a Docker image

on:
pull_request:
branches: ["main"]
push:
branches:
- "!*"
tags:
- "v*"

Expand All @@ -25,29 +25,41 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
- name: Build local docker image
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile

- name: Build and push Docker image (on tagged version)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/reproduce_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
branches: ["main"]
pull_request:
branches: ["main"]

schedule:
- cron: "30 9 * * 1"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_call:


jobs:
run:
runs-on: ubuntu-22.04
Expand All @@ -23,7 +23,7 @@ jobs:

- name: Cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand All @@ -48,7 +48,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
./data/mesh
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/scientificcomputing/fenics-gmsh:2023-08-16
FROM ghcr.io/scientificcomputing/fenics-gmsh:2024-02-19

ARG REPO_BRANCH="main"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "my-fenics-paper"
version = "0.3.0"
version = "0.4.0"
dependencies = [
"h5py==3.9.0", # Pin to same version that is allready installed in the docker image
"cardiac-geometries>=0.11.0",
Expand Down

0 comments on commit 9d2413c

Please sign in to comment.