Skip to content

Commit cabe1d0

Browse files
authored
Separate x86 and arm build jobs
1 parent 842a40e commit cabe1d0

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,38 @@ env:
1010
IMAGE_NAME: ${{ github.repository }}
1111

1212
jobs:
13-
build:
13+
build-x86:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Log in to the Container registry
21+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v2
28+
29+
- name: Extract metadata (tags, labels) for Docker
30+
id: meta
31+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
32+
with:
33+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34+
35+
- name: Build and push Docker image
36+
uses: docker/build-push-action@v4
37+
with:
38+
context: .
39+
platforms: linux/amd64
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}
43+
44+
build-arm:
1445
runs-on: ubuntu-latest
1546
permissions:
1647
contents: read
@@ -38,7 +69,7 @@ jobs:
3869
uses: docker/build-push-action@v4
3970
with:
4071
context: .
41-
platforms: linux/amd64,linux/arm64
72+
platforms: linux/arm64
4273
push: true
4374
tags: ${{ steps.meta.outputs.tags }}
4475
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)