mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Create workflow for building cross-platform image
This commit is contained in:
parent
f816563c2e
commit
8f9b6096c5
38
.github/workflows/cross-compile-docker.yml
vendored
Normal file
38
.github/workflows/cross-compile-docker.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: "(Cross) Compile Dendrite"
|
||||||
|
|
||||||
|
# dummy
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compile:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
binary: [dendrite-monolith-server]
|
||||||
|
env:
|
||||||
|
GOARCH: ${{ matrix.target }}
|
||||||
|
DOCKER_HUB_USER: dendritegithub
|
||||||
|
# DOCKER_NAMESPACE: matrixdotorg
|
||||||
|
DOCKER_NAMESPACE: localhost:5000/matrixdotorg
|
||||||
|
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
services:
|
||||||
|
registry:
|
||||||
|
image: registry:2
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
steps:
|
||||||
|
# - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# - uses: docker/setup-qemu-action@v1
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
with:
|
||||||
|
driver-opts: network=host
|
||||||
|
- name: build dendrite in Docker
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./build/docker/Dockerfile
|
||||||
|
push: true
|
||||||
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
build-args: "DENDRITE_BINARY=${{ matrix.binary }}"
|
||||||
|
tags: "${{ env.DOCKER_NAMESPACE }}/${{ matrix.binary }}:latest"
|
||||||
Loading…
Reference in a new issue