From 35b37043569d46d5c540355a53d4d79cd5ee1b03 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 12:47:03 +0000 Subject: [PATCH 1/3] Cache Docker image builds using GitHub Actions cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use docker/setup-buildx-action and docker/build-push-action with GHA cache backend (type=gha, mode=max) to cache Docker layers between CI runs. This avoids rebuilding unchanged layers, significantly speeding up builds — especially the full OpenMS compilation in Dockerfile. Each job uses a separate cache scope to avoid conflicts. mode=max caches all intermediate multi-stage layers, not just the final image. https://claude.ai/code/session_01URHRBGmtAaVif55VvwnjNu --- .github/workflows/build-docker-images.yml | 26 +++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index fcb77220a..96c0c45d4 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -13,15 +13,33 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build the full Docker image - run: docker build . --file Dockerfile --tag streamlitapp:latest + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile + tags: streamlitapp:latest + load: true + cache-from: type=gha,scope=full-app + cache-to: type=gha,mode=max,scope=full-app build-simple-app: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Build the Docker image (pyOpenMS only) - run: docker build . --file Dockerfile_simple --tag streamlitapp-simple:latest \ No newline at end of file + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile_simple + tags: streamlitapp-simple:latest + load: true + cache-from: type=gha,scope=simple-app + cache-to: type=gha,mode=max,scope=simple-app \ No newline at end of file From 25564c6b1f6b7a80ca0f070c75b08105e0c853fb Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 13:59:55 +0000 Subject: [PATCH 2/3] test: trigger CI to populate Docker layer cache https://claude.ai/code/session_01URHRBGmtAaVif55VvwnjNu --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index d9b3d73d0..adce2c47e 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -import streamlit as st +import streamlit as st # cache test from pathlib import Path import json # For some reason the windows version only works if this is imported here From afd5579b978b0ae277d7718f0e2fd6d8d073a091 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Mar 2026 14:00:05 +0000 Subject: [PATCH 3/3] revert: undo cache test change in app.py https://claude.ai/code/session_01URHRBGmtAaVif55VvwnjNu --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index adce2c47e..d9b3d73d0 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -import streamlit as st # cache test +import streamlit as st from pathlib import Path import json # For some reason the windows version only works if this is imported here