1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Adding experimental branch buildflow

(cherry picked from commit c2b0276a60f1d21d18cc56d234f5dce0c5d1fffc)
This commit is contained in:
Patrik J. Braun 2021-05-13 10:01:52 +02:00
parent 315c174ff9
commit 8bbace1a73

View File

@ -1,9 +1,13 @@
name: docker-buildx name: docker-buildx
on: on:
pull_request: pull_request:
branches: master branches:
- master
- experimental
push: push:
branches: master branches:
- master
- experimental
tags: tags:
- '*.*' - '*.*'
@ -112,15 +116,25 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- -
name: Test build on Pull request name: Test build on Pull request
if: ${{ startsWith(steps.vars.outputs.type , 'head') && github.event.issue.pull_request }} if: ${{ startsWith(steps.vars.outputs.type , 'head') && github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
file: docker/${{ matrix.container }}/Dockerfile.build file: docker/${{ matrix.container }}/Dockerfile.build
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
-
name: Build experimental
if: ${{ github.ref == 'refs/heads/experimental' }}
uses: docker/build-push-action@v2
with:
context: .
file: docker/${{ matrix.container }}/Dockerfile.build
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: bpatrik/pigallery2:experimental-${{ matrix.container }}
- -
name: Build and push nightly on new master commit name: Build and push nightly on new master commit
if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request }} if: ${{ startsWith(steps.vars.outputs.type , 'head') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
@ -130,7 +144,7 @@ jobs:
tags: bpatrik/pigallery2:nightly-${{ matrix.container }} tags: bpatrik/pigallery2:nightly-${{ matrix.container }}
- -
name: Build and push release on new Tag name: Build and push release on new Tag
if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request }} if: ${{ startsWith(steps.vars.outputs.type , 'tag') && !github.event.issue.pull_request && github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .