From 07c18dfb91b2d8334b62a63f2df05dcbc0b25471 Mon Sep 17 00:00:00 2001 From: Martial BE Date: Wed, 6 Mar 2024 18:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20action=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-image.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index cb916557..16dbc0e3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,15 +25,14 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Save version info + - name: Save dev version info run: | - TAG=$(git describe --tags --exact-match 2> /dev/null) - if [ $? -eq 0 ]; then - echo $TAG > VERSION - else - HASH=$(git rev-parse --short=7 HEAD) - echo "dev-$HASH" > VERSION - fi + HASH=$(git rev-parse --short=7 HEAD) + echo "dev-$HASH" > VERSION + - name: Save Tag version info + if: startsWith(github.ref, 'refs/tags/') + run: | + git describe --tags > VERSION - name: Set up QEMU uses: docker/setup-qemu-action@v2