Skip to content

Commit 14d2f69

Browse files
committed
Cache images
1 parent 7e6bd20 commit 14d2f69

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎.github/workflows/check-build.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ jobs:
4444
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
4545
restore-keys: |
4646
${{ runner.os }}-mvn-build-
47+
48+
- name: Docker Image Cache Restore
49+
id: docker-image-cache-restore
50+
uses: xdev-software/tci/.github/actions/docker-image-cache/restore@f75904872b55915e2a2f0080779a36e27c467d21 # v4.5.3
51+
with:
52+
# This cache could always change however because docker images can be changed remotely if the version is not fixated
53+
# As a compromise it utilizes the hash of the pom files because when the dependencies stay the same
54+
# the images should also be roughly the same
55+
key: ${{ runner.os }}-build-docker-images-${{ matrix.project }}-${{ hashFiles('**/pom.xml') }}
56+
restore-keys: |
57+
${{ runner.os }}-build-docker-images-${{ matrix.project }}-
4758
4859
- name: Build with Maven
4960
run: ./mvnw -B clean package -P run-integration-tests
@@ -66,6 +77,14 @@ jobs:
6677
exit 1
6778
fi
6879
80+
- name: Docker Image Cache Save
81+
uses: xdev-software/tci/.github/actions/docker-image-cache/save@f75904872b55915e2a2f0080779a36e27c467d21 # v4.5.3
82+
# Only save cache for one instance, otherwise they try to overwrite each other
83+
if: ${{ matrix.java == 25 }}
84+
with:
85+
key: ${{ steps.docker-image-cache-restore.outputs.key }}
86+
cache-hit: ${{ steps.docker-image-cache-restore.outputs.cache-hit }}
87+
6988
checkstyle:
7089
runs-on: ubuntu-latest
7190
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}

0 commit comments

Comments
 (0)