From 580ab16cef49a875db86e0266b30a456ed1d2a6e Mon Sep 17 00:00:00 2001 From: John Date: Sun, 13 Feb 2022 16:38:28 +0100 Subject: [PATCH] allow limit to single arch --- .github/workflows/build.yml | 14 ++++++++++++-- contrib/docker/build.sh | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e88e8b7..72878e4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,17 @@ on: - 'Makefile*' - 'make_debian.sh' - 'contrib/docker/**' - + workflow_dispatch: + inputs: + limitarch: + description: Limit to this architecture + required: false + type: choice + options: + - amd64 + - '386' + - arm/v7 + - arm64 jobs: build: runs-on: ubuntu-latest @@ -35,4 +45,4 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: build - run: cd contrib/docker && ./build.sh + run: cd contrib/docker && LIMITARCH=${{ inputs.limitarch }} ./build.sh diff --git a/contrib/docker/build.sh b/contrib/docker/build.sh index 1a1c6c54..f9ae2ced 100755 --- a/contrib/docker/build.sh +++ b/contrib/docker/build.sh @@ -7,6 +7,9 @@ if [[ "$1" == "-h" ]]; then exit 1 fi archs=linux/amd64,linux/386,linux/arm/v7,linux/arm64 +if [[ -n "$LIMITARCH" ]]; then + archs=$(echo ",$archs," | sed -e "s#.*,\([^,/]*/$LIMITARCH\),.*#\1#") +fi if [[ -z "$1" ]] || [[ "x$1" == "xrelease" ]]; then UPLOAD_URL= elif [[ -z "$UPLOAD_URL" ]]; then