Skip to content

Commit

Permalink
Adding experimental branch buildflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatrik committed May 13, 2021
1 parent dba4c8b commit c2b0276
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: docker-buildx
on:
pull_request:
branches: master
branches:
- master
- experimental
push:
branches: master
branches:
- master
- experimental
tags:
- '*.*'

Expand Down Expand Up @@ -84,7 +88,7 @@ jobs:
strategy:
matrix:
container: [alpine, debian-stretch, debian-buster]

steps:
-
name: Set tag
Expand Down Expand Up @@ -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: .
Expand All @@ -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: .
Expand Down

0 comments on commit c2b0276

Please sign in to comment.