Skip to content

Commit

Permalink
ci: split ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
maamokun committed Dec 13, 2024
1 parent 4c29dd4 commit 44f2630
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
build:
build-amd64:
runs-on: ubuntu-latest
env:
IMAGE_NAME: mikanbot
Expand All @@ -25,10 +25,39 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Build and push
- name: Build and push (AMD64)
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
build-arm64:
runs-on: ubuntu-latest
env:
IMAGE_NAME: mikanbot

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Build and push (ARM64)
uses: docker/build-push-action@v4
with:
platforms: linux/arm64
context: .
push: true
tags: |
Expand Down

0 comments on commit 44f2630

Please sign in to comment.