From 8bbace1a7381303180e24e3c9fe351dd267e89d0 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Thu, 13 May 2021 10:01:52 +0200 Subject: [PATCH] Adding experimental branch buildflow (cherry picked from commit c2b0276a60f1d21d18cc56d234f5dce0c5d1fffc) --- .github/workflows/build.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 560da788..89a3ebb3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,13 @@ name: docker-buildx on: pull_request: - branches: master + branches: + - master + - experimental push: - branches: master + branches: + - master + - experimental tags: - '*.*' @@ -84,7 +88,7 @@ jobs: strategy: matrix: container: [alpine, debian-stretch, debian-buster] - + steps: - name: Set tag @@ -112,15 +116,25 @@ jobs: password: ${{ secrets.REGISTRY_PASSWORD }} - 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 with: context: . file: docker/${{ matrix.container }}/Dockerfile.build 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 - 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 with: context: . @@ -130,7 +144,7 @@ jobs: tags: bpatrik/pigallery2:nightly-${{ matrix.container }} - 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 with: context: .