message: adding tag support for workflow
diff: @@ -4,6 +4,8 @@ on:
  branches: master
  push:
  branches: master
  + tags:
  + - 'v*'
  jobs:
  create-release:
  @@ -31,6 +33,10 @@ jobs:
  runs-on: [ubuntu-latest]
  needs: [create-release]
  steps:
  + -
  + name: Set tag
  + id: vars
  + run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
  -
  name: Checkout
  uses: actions/checkout@v1
  @@ -56,12 +62,25 @@ jobs:
  DOCKER_REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
  -
  name: Run Buildx alpine
  + if: startsWith(steps.vars.outputs.tag, 'master')
  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: Run Buildx alpine for tag
  + if: startsWith(steps.vars.outputs.tag, 'v')
  + env:
  + RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
  + 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 \
  + --tag bpatrik/pigallery2:$RELEASE_VERSION-alpine \
  + --tag bpatrik/pigallery2:latest-alpine \
  + --file docker/alpine/Dockerfile.build .
  -
  name: Docker logout
  run: |
  @@ -70,6 +89,10 @@ jobs:
  runs-on: [ubuntu-latest]
  needs: [create-release]
  steps:
  + -
  + name: Set tag
  + id: vars
  + run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
  -
  name: Checkout
  uses: actions/checkout@v1
  @@ -95,11 +118,25 @@ jobs:
  DOCKER_REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
  -
  name: Run Buildx stretch
  + if: startsWith(steps.vars.outputs.tag, 'master')
  + run: |
  + docker buildx build \
  + --platform linux/amd64,linux/arm64,linux/arm/v7 \
  + --output "type=image,push=true" \
  + --tag bpatrik/pigallery2:nightly-stretch \
  + --file docker/debian-stretch/Dockerfile.build .
  + -
  + name: Run Buildx stretch for tag
  + if: startsWith(steps.vars.outputs.tag, 'v')
  + env:
  + RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
  run: |
  docker buildx build \
  --platform linux/amd64,linux/arm64,linux/arm/v7 \
  --output "type=image,push=true" \
  --tag bpatrik/pigallery2:nightly-stretch \
  + --tag bpatrik/pigallery2:$RELEASE_VERSION \
  + --tag bpatrik/pigallery2:latest \
  --file docker/debian-stretch/Dockerfile.build .
  -
  name: Docker logout
  