Skip to content

Commit 2b6c8e8

Browse files
committed
temp reduce Dockerhub load, improve caching
1 parent b895411 commit 2b6c8e8

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212

1313
strategy:
1414
fail-fast: false
15+
max-parallel: 2
1516
matrix:
1617
mediawiki_version: ['1.45', '1.44', '1.43', '1.39']
1718
target_repository: ['mediawiki', 'mediawiki-ci']
@@ -45,11 +46,13 @@ jobs:
4546
- name: Cache Docker layers
4647
uses: actions/cache@v4
4748
with:
48-
path: /tmp/.buildx-cache/${{ matrix.mediawiki_version }}
49-
key: ${{ runner.os }}-buildx-${{ github.sha }}
49+
path: /tmp/.buildx-cache/${{ matrix.mediawiki_version }}/php${{ matrix.php_version }}
50+
key: ${{ runner.os }}-buildx-${{ matrix.mediawiki_version }}-${{ matrix.php_version }}
5051
restore-keys: |
52+
${{ runner.os }}-buildx-${{ matrix.mediawiki_version }}-
5153
${{ runner.os }}-buildx-
5254
55+
5356
- uses: docker/login-action@v3
5457
with:
5558
username: ${{ secrets.DOCKER_HUB_USERNAME }}
@@ -105,9 +108,11 @@ jobs:
105108
push: true
106109
tags: ${{ env.TAGS }}
107110
target: ${{ matrix.target_repository }}
108-
cache-from: type=local,src=/tmp/.buildx-cache/${{ matrix.mediawiki_version }}
109-
cache-to: type=local,dest=/tmp/.buildx-cache/${{ matrix.mediawiki_version }}
110-
platforms: linux/amd64,linux/arm64
111+
cache-from: type=local,src=/tmp/.buildx-cache/${{ matrix.mediawiki_version }}/php${{ matrix.php_version }}
112+
cache-to: type=local,dest=/tmp/.buildx-cache/${{ matrix.mediawiki_version }}/php${{ matrix.php_version }},mode=max
113+
# platforms: linux/amd64,linux/arm64
114+
# temp. build only amd64:
115+
platforms: linux/amd64
111116

112117
- name: Image digest
113118
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)