Skip to content

Commit b2c934e

Browse files
committed
build multi-platform docker images
1 parent feb7ad8 commit b2c934e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/docker.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create and publish a Docker image
1+
name: Publish Docker images
22
on:
33
workflow_run:
44
workflows: [ "Rust" ]
@@ -11,39 +11,43 @@ env:
1111
IMAGE_NAME: ${{ github.repository }}
1212

1313
jobs:
14-
build-and-push-image:
15-
runs-on: ubuntu-latest
16-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
build:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-24.04, ubuntu-24.04-arm]
1719

1820
permissions:
1921
contents: read
2022
packages: write
2123
attestations: write
2224
id-token: write
2325

26+
runs-on: ${{ matrix.os }}
27+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2428
steps:
2529
- name: Checkout repository
2630
uses: actions/checkout@v4
2731

2832
- name: Log in to the Container registry
29-
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
33+
uses: docker/login-action@v3
3034
with:
3135
registry: ${{ env.REGISTRY }}
3236
username: ${{ github.actor }}
3337
password: ${{ secrets.GITHUB_TOKEN }}
3438

3539
- name: Extract metadata (tags, labels) for Docker
3640
id: meta
37-
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
41+
uses: docker/metadata-action@v5
3842
with:
3943
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4044

41-
- name: Sync theme submodule
42-
run: git submodule sync && git submodule update --init --recursive
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v3
4347

4448
- name: Build and push Docker image
4549
id: push
46-
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
50+
uses: docker/build-push-action@v6
4751
with:
4852
context: .
4953
push: true

0 commit comments

Comments
 (0)