From 5553b91a4dbd59cddcfe01371c51ddc45371f334 Mon Sep 17 00:00:00 2001 From: Suika <2320837+Suika@users.noreply.github.com> Date: Mon, 23 Dec 2019 13:55:42 +0000 Subject: [PATCH 1/2] Speedup docker builds GHA allows 20 concurrent jobs. So make use of it. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits --- .github/workflows/blank.yml | 49 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 99984538..df9e70fd 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -27,7 +27,46 @@ jobs: with: name: pigallery2-release path: release - build: + build-alpine: + runs-on: [ubuntu-latest] + needs: [create-release] + steps: + - + name: Checkout + uses: actions/checkout@v1 + - + uses: actions/download-artifact@v1 + with: + name: pigallery2-release + - + name: Set up Docker Buildx + id: buildx + uses: crazy-max/ghaction-docker-buildx@v1 + with: + version: latest + - + name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + - + name: Docker login + run: | + docker login -u "${DOCKER_REGISTRY_USERNAME}" -p "${DOCKER_REGISTRY_PASSWORD}" + env: + DOCKER_REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + DOCKER_REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + - + name: Run Buildx alpine + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/386,linux/arm/v6,linux/arm/v7 \ + --output "type=image,push=true" \ + --tag bpatrik/pigallery2:nightly-alpine \ + --file docker/alpine/Dockerfile.build . + - + name: Docker logout + run: | + docker logout + build-stretch: runs-on: [ubuntu-latest] needs: [create-release] steps: @@ -62,14 +101,6 @@ jobs: --output "type=image,push=true" \ --tag bpatrik/pigallery2:nightly-stretch \ --file docker/debian-stretch/Dockerfile.build . - - - name: Run Buildx alpine - run: | - docker buildx build \ - --platform linux/amd64,linux/arm64,linux/386,linux/arm/v6,linux/arm/v7 \ - --output "type=image,push=true" \ - --tag bpatrik/pigallery2:nightly-alpine \ - --file docker/alpine/Dockerfile.build . - name: Docker logout run: | From c186a8e4310aa08132727860571b2af673c70b53 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Mon, 23 Dec 2019 21:00:08 +0100 Subject: [PATCH 2/2] Update blank.yml --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index df9e70fd..56ab63af 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,4 +1,4 @@ -name: buildx +name: docker-buildx on: pull_request: branches: master