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

Update build.yml

Updating alpine build actions
This commit is contained in:
Patrik J. Braun 2020-12-25 15:31:59 +01:00 committed by GitHub
parent 542bbfb7ff
commit ed5252e62e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,47 +93,45 @@ jobs:
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: pigallery2-release name: pigallery2-release
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with: with:
buildx-version: latest username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- -
name: Available platforms name: Build and push alpine nightly
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
if: startsWith(steps.vars.outputs.type , 'head') if: startsWith(steps.vars.outputs.type , 'head')
run: | uses: docker/build-push-action@v2
docker buildx build \ with:
--platform linux/amd64,linux/arm64,linux/arm/v7 \ context: .
--output "type=image,push=true" \ file: docker/alpine/Dockerfile.build
--tag bpatrik/pigallery2:nightly-alpine \ platforms: linux/amd64,linux/arm64,linux/arm/v7
--file docker/alpine/Dockerfile.build . push: true
- name: Run Buildx alpine for tag type: image
tags: bpatrik/pigallery2:nightly-alpine
-
name: Build and push alpine nightly
if: startsWith(steps.vars.outputs.type , 'tag') if: startsWith(steps.vars.outputs.type , 'tag')
env: env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: | uses: docker/build-push-action@v2
docker buildx build \ with:
--platform linux/amd64,linux/arm64,linux/arm/v7 \ context: .
--output "type=image,push=true" \ file: docker/alpine/Dockerfile.build
--tag bpatrik/pigallery2:nightly-alpine \ platforms: linux/amd64,linux/arm64,linux/arm/v7
--tag bpatrik/pigallery2:$RELEASE_VERSION-alpine \ push: true
--tag bpatrik/pigallery2:latest-alpine \ type: image
--file docker/alpine/Dockerfile.build . tags: |
- bpatrik/pigallery2:nightly-alpine
name: Docker logout bpatrik/pigallery2:$RELEASE_VERSION-alpine
run: | bpatrik/pigallery2:latest-alpine
docker logout
build-stretch: build-stretch:
runs-on: [ubuntu-latest] runs-on: [ubuntu-latest]
needs: [create-release] needs: [create-release]