Add multi-architecture image build (#314)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2023-04-10 13:31:08 -05:00
1 parent 8c59a3485d
commit 64f9c3a250
2 files changed
+16 -24

No files matched your search

+7 -14
View File
@@ -19,20 +19,12 @@ jobs:
if: github.repository == 'itzg/docker-minecraft-bedrock-server'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
@@ -42,17 +34,18 @@ jobs:
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v4.3.0
uses: docker/metadata-action@v4
with:
images: itzg/minecraft-bedrock-server
flavor: |
latest=${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
latest=${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
provenance: false
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: |
${{ steps.meta.outputs.labels }}