Skip to content

Commit 5c845aa

Browse files
fix: better os concurrency
1 parent 2ddbdf9 commit 5c845aa

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

content/manuals/build/ci/github-actions/multi-platform.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,23 @@ env:
123123
124124
jobs:
125125
build:
126-
runs-on: ubuntu-latest
126+
runs-on: ${{ matrix.config.runs-on }}
127127
strategy:
128128
fail-fast: false
129129
matrix:
130-
platform:
131-
- linux/amd64
132-
- linux/arm64
130+
config:
131+
- platform: linux/arm64
132+
runs-on: ubuntu-24.04-arm
133+
- platform: linux/amd64
134+
runs-on: ubuntu-24.04
133135
steps:
136+
- uses: actions/checkout@v4
137+
with:
138+
fetch-depth: 0 # important so tags/history are available
139+
134140
- name: Prepare
135141
run: |
136-
platform=${{ matrix.platform }}
142+
platform=${{ matrix.config.platform }}
137143
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
138144
139145
- name: Docker meta
@@ -158,10 +164,12 @@ jobs:
158164
id: build
159165
uses: docker/build-push-action@v6
160166
with:
161-
platforms: ${{ matrix.platform }}
167+
platforms: ${{ matrix.config.platform }}
162168
labels: ${{ steps.meta.outputs.labels }}
163169
tags: ${{ env.REGISTRY_IMAGE }}
164170
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
171+
cache-from: type=gha
172+
cache-to: type=gha,mode=max
165173
166174
- name: Export digest
167175
run: |

0 commit comments

Comments
 (0)