Add github actions for multiarch

This commit is contained in:
Xiaonan Shen
2020-06-01 07:06:41 -07:00
parent 55175292b0
commit 635fb1d8b1
4 changed files with 65 additions and 1 deletions

21
build/build-docker.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -ex
# Enter the right path
SCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT`
cd $SCRIPTPATH
# Set docker tag
VERSION=`cat VERSION`
if [[ $GITHUB_REF == "refs/heads/master" ]]; then
TAG_TYPE="build"
TAG_VERTION="${VERSION}-build"
else
TAG_TYPE="build-dev"
TAG_VERTION="${VERSION}-build-dev"
fi
# Build multiarch and push
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 -t ${DOCKER_REPO}:${TAG_TYPE} -t ${DOCKER_REPO}:${TAG_VERSION} --push .

8
build/gpgparams Normal file
View File

@@ -0,0 +1,8 @@
%no-protection
%echo Generating a basic OpenPGP key
Key-Type: RSA
Key-Length: 2048
Name-Real: pass-key
Expire-Date: 0
%commit
%echo done