diff --git a/.github/workflows/cross-compile-docker.yml b/.github/workflows/cross-compile-docker.yml new file mode 100644 index 000000000..42a3cd91b --- /dev/null +++ b/.github/workflows/cross-compile-docker.yml @@ -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"