diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d3ea7b8..4ee1015 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: - main jobs: - build: + build-amd64: runs-on: ubuntu-latest env: IMAGE_NAME: mikanbot @@ -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: |