From 9d2413cfbeb08e91e561889727b071a16bc9a02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20S=2E=20Dokken?= Date: Tue, 30 Apr 2024 11:25:01 +0200 Subject: [PATCH] Try updating example paper workflows --- .github/workflows/build_docs.yml | 10 ++++----- .github/workflows/docker-image.yml | 30 +++++++++++++++++-------- .github/workflows/reproduce_results.yml | 8 +++---- docker/Dockerfile | 2 +- pyproject.toml | 2 +- 5 files changed, 31 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 9f197a6..2900d72 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -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 @@ -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 @@ -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 }} @@ -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 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index df0e22f..d6f62ca 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,9 +6,9 @@ name: Create and publish a Docker image on: + pull_request: + branches: ["main"] push: - branches: - - "!*" tags: - "v*" @@ -25,16 +25,16 @@ 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 }} @@ -42,12 +42,24 @@ jobs: - 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 diff --git a/.github/workflows/reproduce_results.yml b/.github/workflows/reproduce_results.yml index 3af23d4..c2add67 100644 --- a/.github/workflows/reproduce_results.yml +++ b/.github/workflows/reproduce_results.yml @@ -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 @@ -23,7 +23,7 @@ jobs: - name: Cache id: cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cache/pip @@ -48,7 +48,7 @@ jobs: - name: Upload artifact if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | ./data/mesh diff --git a/docker/Dockerfile b/docker/Dockerfile index 4ab4025..c91387a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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" diff --git a/pyproject.toml b/pyproject.toml index ab6a1d1..d610dc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",