Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
remove buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
maxb2 committed Apr 4, 2021
1 parent 06d0705 commit f5ebf44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 35 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/build-stubs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,29 @@ jobs:
platform: [linux/arm/v7, linux/arm64/v8]
include:
- platform: linux/arm/v7
arch: armv7
arch: arm32v7
output: linux-armv7
- platform: linux/arm64/v8
arch: arm64
arch: arm64v8
output: linux-arm64
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: ${{ matrix.platform }}

- name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Enable Docker Experimental Features
run: |
echo $'{\n "experimental": true\n}' | sudo tee /etc/docker/daemon.json
mkdir -p ~/.docker
echo $'{\n "experimental": "enabled"\n}' | sudo tee ~/.docker/config.json
sudo service docker restart
docker version -f '{{.Client.Experimental}}'
docker version -f '{{.Server.Experimental}}'
- name: Build ${{ matrix.arch }}
run: |
cd stubs
docker buildx build -f arm-compile.Dockerfile \
--platform ${{ matrix.platform }} \
--build-arg OUTPUT=${{ matrix.output }} \
--load -t stub:${{ matrix.arch }} .
APP=$(docker run --rm -it -d stub:${{ matrix.arch }})
docker cp $APP:/usr/src/build/${{ matrix.output }} ./
docker kill $APP
docker run --rm --platform ${{ matrix.platform }} -v "$PWD":/usr/src/myapp -w /usr/src/myapp ${{ matrix.arch }}/golang:1.16 go build -o ${{ matrix.output }} stub.go
echo >> ${{ matrix.output }} && echo '### CAXA ###' >> ${{ matrix.output }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down
13 changes: 0 additions & 13 deletions stubs/arm-compile.Dockerfile

This file was deleted.

0 comments on commit f5ebf44

Please sign in to comment.