From f94c14cf733605aec732f98feb0a4925c8027c0e Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 28 Nov 2024 09:04:39 +0100 Subject: [PATCH] Use build container from base branch If there have been no changes to the build container, make sure to use the container from the base branch. This fixes builds for PRs which don't touch the build containers Dockerfile. --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4a07126..26d9ff4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -106,6 +106,9 @@ jobs: if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^Dockerfile'; then echo "Dockerfile or related files changed; building container." build_needed=true + else + echo "No changes to Dockerfile; using container from base branch." + tag="${{ github.base_ref }}" fi fi fi