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

improving workflow

This commit is contained in:
Patrik J. Braun 2019-12-30 00:50:03 +01:00
parent 8fd13935b6
commit a694d9c187

View File

@ -36,7 +36,7 @@ jobs:
-
name: Set tag
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) && echo ::set-output name=type::$(echo ${GITHUB_REF:5})
-
name: Checkout
uses: actions/checkout@v1
@ -62,7 +62,7 @@ jobs:
DOCKER_REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
-
name: Run Buildx alpine
if: startsWith(steps.vars.outputs.tag, 'master')
if: startsWith(steps.vars.outputs.type , 'head')
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/386,linux/arm/v6,linux/arm/v7 \
@ -70,7 +70,7 @@ jobs:
--tag bpatrik/pigallery2:nightly-alpine \
--file docker/alpine/Dockerfile.build .
- name: Run Buildx alpine for tag
if: startsWith(steps.vars.outputs.tag, 'v')
if: startsWith(steps.vars.outputs.type , 'tag')
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
@ -92,7 +92,7 @@ jobs:
-
name: Set tag
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) && echo ::set-output name=type::$(echo ${GITHUB_REF:5})
-
name: Checkout
uses: actions/checkout@v1
@ -118,7 +118,7 @@ jobs:
DOCKER_REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
-
name: Run Buildx stretch
if: startsWith(steps.vars.outputs.tag, 'master')
if: startsWith(steps.vars.outputs.type , 'head')
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
@ -127,7 +127,7 @@ jobs:
--file docker/debian-stretch/Dockerfile.build .
-
name: Run Buildx stretch for tag
if: startsWith(steps.vars.outputs.tag, 'v')
if: startsWith(steps.vars.outputs.type , 'tag')
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |