@@ -33,18 +33,25 @@ jobs:
3333 setup :
3434 name : Begin trail
3535 runs-on : ubuntu-latest
36+ outputs :
37+ kosli-trail : ${{ steps.set-kosli-trail.outputs.kosli-trail }}
3638 steps :
3739 - uses : actions/checkout@v4
3840
3941 - name : Set KOSLI_TRAIL to tag if available
40- if : startsWith(github.ref, 'refs/tags/')
41- run : echo "KOSLI_TRAIL=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
42+ id : set-kosli-trail
43+ run : |
44+ if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
45+ echo "kosli-trail=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
46+ else
47+ echo "kosli-trail=${GITHUB_SHA}" >> $GITHUB_OUTPUT
48+ fi
4249
4350 - name : Begin trail
4451 if : ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
4552 uses : ./.github/actions/kosli-begin-trail
4653 with :
47- kosli-trail : ${{ env.KOSLI_TRAIL }}
54+ kosli-trail : ${{ steps.set-kosli-trail.outputs.kosli-trail }}
4855 kosli-template-file : ${{ env.KOSLI_TEMPLATE_FILE }}
4956
5057
8188 if : ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
8289 needs : [setup]
8390 runs-on : ubuntu-latest
91+ env :
92+ KOSLI_TRAIL : ${{ needs.setup.outputs.kosli-trail }}
8493 steps :
8594 - uses : actions/checkout@v4
8695
@@ -133,6 +142,8 @@ jobs:
133142 name : Assert artifacts
134143 if : ${{ (github.event_name != 'workflow_dispatch' && needs.semver-tag.outputs.release-to-prod == 'true') }}
135144 needs : [build, pull-request, deploy-stage, semver-tag]
145+ env :
146+ KOSLI_TRAIL : ${{ needs.setup.outputs.kosli-trail }}
136147 runs-on : ubuntu-latest
137148 steps :
138149 - name : Setup Kosli cli
0 commit comments