1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Merge pull request #113 from Suika/patch-1

Speedup docker builds
This commit is contained in:
Patrik J. Braun 2019-12-23 19:28:01 +01:00 committed by GitHub
commit 8fd36d5d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,46 @@ jobs:
with: with:
name: pigallery2-release name: pigallery2-release
path: 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] runs-on: [ubuntu-latest]
needs: [create-release] needs: [create-release]
steps: steps:
@ -62,14 +101,6 @@ jobs:
--output "type=image,push=true" \ --output "type=image,push=true" \
--tag bpatrik/pigallery2:nightly-stretch \ --tag bpatrik/pigallery2:nightly-stretch \
--file docker/debian-stretch/Dockerfile.build . --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 name: Docker logout
run: | run: |