diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 9506e7ec..7015a447 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -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: |