From 1caec218e70c8ef7ab15c14bc99d91cab7c01798 Mon Sep 17 00:00:00 2001 From: Ashaffah Date: Thu, 22 Feb 2024 10:06:01 +0700 Subject: [PATCH] Update Docker image workflow to trigger on release events --- .github/workflows/docker-image.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9933402..91db9a2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,11 +2,11 @@ name: Build and Push Docker Image on: push: - branches: - - main release: types: - created + branches: + - main jobs: build-and-push: @@ -34,7 +34,8 @@ jobs: - name: Set previous version run: | if git rev-parse --verify "refs/tags/*" >/dev/null 2>&1; then - echo "PREVIOUS_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + PREVIOUS_VERSION=$(git describe --tags --abbrev=0) + echo "PREVIOUS_VERSION=$PREVIOUS_VERSION" >> $GITHUB_ENV else echo "PREVIOUS_VERSION=none" >> $GITHUB_ENV fi