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