From c8dbb38f82a873032c7eae205fcc5783473f8ad6 Mon Sep 17 00:00:00 2001 From: Joonas Onatsu Date: Mon, 11 Nov 2024 18:38:34 +0200 Subject: [PATCH] fixes --- .github/workflows/test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01f8923..970b811 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,10 +29,6 @@ jobs: - name: Generate build version shell: bash run: | - # Default to version based on GITHUB_SHA - buildver="${{ github.sha }}" - buildver="git-${buildver:0:7}" - if [[ "${{ github.ref_type }}" == "tag" ]]; then buildver="${{ github.ref_name }}" elif [[ "${{ github.ref_type }}" == "branch" ]]; then @@ -41,7 +37,8 @@ jobs: buildver="$(git describe --tags "${{ github.ref }}")" else # No reachable parent tag on branch - buildver="${{ github.ref_name }}-${{ github.sha:0:7 }}" + hash="${{ github.sha }}" + buildver="${{ github.ref_name }}-${hash:0:7}" fi fi