Skip to content

Commit 44f2630

Browse files
committed
ci: split ci jobs
1 parent 4c29dd4 commit 44f2630

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/docker.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
jobs:
9-
build:
9+
build-amd64:
1010
runs-on: ubuntu-latest
1111
env:
1212
IMAGE_NAME: mikanbot
@@ -25,10 +25,39 @@ jobs:
2525
username: ${{ github.repository_owner }}
2626
password: ${{ secrets.CR_PAT }}
2727

28-
- name: Build and push
28+
- name: Build and push (AMD64)
2929
uses: docker/build-push-action@v4
3030
with:
31-
platforms: linux/amd64,linux/arm64
31+
platforms: linux/amd64
32+
context: .
33+
push: true
34+
tags: |
35+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
36+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
37+
38+
build-arm64:
39+
runs-on: ubuntu-latest
40+
env:
41+
IMAGE_NAME: mikanbot
42+
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v2
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v1
49+
50+
- name: Login to GitHub Container Registry
51+
uses: docker/login-action@v2
52+
with:
53+
registry: ghcr.io
54+
username: ${{ github.repository_owner }}
55+
password: ${{ secrets.CR_PAT }}
56+
57+
- name: Build and push (ARM64)
58+
uses: docker/build-push-action@v4
59+
with:
60+
platforms: linux/arm64
3261
context: .
3362
push: true
3463
tags: |

0 commit comments

Comments
 (0)