test arm64

This commit is contained in:
Roxedus 2020-11-29 21:42:26 +01:00
parent 8450b3e700
commit fc0c785b0a
Signed by: Roxedus
GPG Key ID: 9B4E311961C63639
4 changed files with 37 additions and 38 deletions

View File

@ -2,43 +2,41 @@ name: Build aarch64
on:
push:
paths-ignore:
- 'README.md'
paths:
- ".github/workflows/build-aarch64.yml"
- "aarch64.Dockerfile"
pull_request:
paths-ignore:
- 'README.md'
- "README.md"
jobs:
build:
runs-on: ubuntu-latest
env:
BUILDKIT_HOST: tcp://0.0.0.0:1234
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_IMAGE: hass-wheel-builder
DOCKER_TAG: latest
PLATFORM_1: amd64
PLATFORM_2: arm
PLATFORM_3: arm64
REPO: tobbenb/hass-wheel-builder-test
steps:
- uses: actions/checkout@v1
- name: Getting buildkit
run: |
sudo docker run --privileged linuxkit/binfmt:v0.7
sudo docker run -d --privileged -p 1234:1234 --name buildkit moby/buildkit:latest --addr tcp://0.0.0.0:1234 \
--oci-worker-platform linux/${PLATFORM_3}
sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/
runs-on: ubuntu-20.04
- name: Build armhf
env:
DOCKERFILE_LOCATION: ./Dockerfile.aarch64
run: |
buildctl build --frontend dockerfile.v0 \
--frontend-opt platform=linux/${PLATFORM_3} \
--frontend-opt filename=./${DOCKERFILE_LOCATION} \
--output type=docker,name=${REPO}:${DOCKER_TAG}-${PLATFORM_3} \
--local dockerfile=. \
--local context=. | docker load
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
install: true
version: latest
driver-opts: image=moby/buildkit:master
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: roxedus
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/arm64
file: ./Dockerfile.aarch64
tags: |
roxedus/playground:hass-aarch64

View File

@ -1,4 +1,4 @@
FROM lsiobase/alpine:arm64v8-3.12
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 as buildstage
# set version label
ARG BUILD_DATE
@ -106,7 +106,8 @@ RUN \
/tmp/repo && \
mv /build/addons/* /tmp/repo/ && \
mv /build/core/* /tmp/repo/ && \
mv /build/hacs/* /tmp/repo/ && \
tar zcf /tmp/wheel-repo-aarch64.tar.gz /tmp/repo
mv /build/hacs/* /tmp/repo/
CMD ["cp", "-avr", "/tmp/wheel-repo-aarch64.tar.gz", "/mnt/"]
FROM scratch
COPY --from=buildstage /tmp/ /