From 9dab5a762848b0e3ca6dfa1cbbb169b81484a066 Mon Sep 17 00:00:00 2001 From: Sebas Risco Date: Wed, 17 Jun 2020 14:16:07 +0200 Subject: [PATCH] Set build only on created release type --- .github/workflows/main.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 256017e4..cae47016 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -4,6 +4,7 @@ on: push: branches: [master] release: + types: [created] jobs: buildx: @@ -23,7 +24,7 @@ jobs: fi TAGS="--tag ${DOCKER_IMAGE}:latest" - if [[ -z $VERSION ]]; then + if [[ ! -v $VERSION ]]; then TAGS="$TAGS --tag ${DOCKER_IMAGE}:${VERSION}" fi @@ -32,7 +33,7 @@ jobs: echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ --build-arg VERSION=${VERSION} \ --build-arg GIT_COMMIT=${GITHUB_SHA::8} \ - ${TAGS} . + ${TAGS} --file Dockerfile . - name: Set up Docker Buildx uses: crazy-max/ghaction-docker-buildx@v3.1.0