From e714a7aa1998f8d45da87aea8baa28a8feae4a14 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Fri, 19 Jun 2020 18:32:44 +0200 Subject: [PATCH] Update workflow --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2c661b..141e3cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,23 +56,23 @@ jobs: run: | docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} - name: Docker Login - if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) env: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: | echo "${DOCKER_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin - name: Docker Buildx (push) - if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) run: | docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} - name: Docker Check Manifest - if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch) + if: success() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) run: | docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} - name: Clear - if: always() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch) + if: always() && github.event_name != 'pull_request' && (endsWith(github.ref, github.event.repository.default_branch) || startsWith(github.ref, 'refs/tags/')) run: | rm -f ${HOME}/.docker/config.json