test armhf

This commit is contained in:
Roxedus 2020-11-30 02:11:50 +01:00
parent fc0c785b0a
commit 901cd01769
Signed by: Roxedus
GPG Key ID: 9B4E311961C63639
4 changed files with 48 additions and 49 deletions

View File

@ -4,7 +4,7 @@ on:
push:
paths:
- ".github/workflows/build-aarch64.yml"
- "aarch64.Dockerfile"
- "Dockerfile.aarch64"
pull_request:
paths-ignore:
- "README.md"

42
.github/workflows/build-armhf.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Build aarch64
on:
push:
paths:
- ".github/workflows/build-arm64.yml"
- "Dockerfile.armhf"
pull_request:
paths-ignore:
- "README.md"
jobs:
build:
runs-on: ubuntu-20.04
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/arm/v7
file: ./Dockerfile.armhf
tags: |
roxedus/playground:hass-armhf

View File

@ -1,44 +0,0 @@
name: Build armhf
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- '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_2}
sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/
- name: Build armhf
env:
DOCKERFILE_LOCATION: ./Dockerfile.armhf
run: |
buildctl build --frontend dockerfile.v0 \
--frontend-opt platform=linux/${PLATFORM_2} \
--frontend-opt filename=./${DOCKERFILE_LOCATION} \
--output type=docker,name=${REPO}:${DOCKER_TAG}-${PLATFORM_2} \
--local dockerfile=. \
--local context=. | docker load

View File

@ -1,4 +1,4 @@
FROM lsiobase/alpine:arm32v7-3.12
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-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-armhf.tar.gz /tmp/repo
mv /build/hacs/* /tmp/repo/
CMD ["cp", "-avr", "/tmp/wheel-repo-armhf.tar.gz", "/mnt/"]
FROM scratch
COPY --from=buildstage /tmp/ /