File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 2727 go-version-file : " go.mod"
2828
2929 - name : Get release tag
30- run : echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
30+ run : |
31+ RELEASE_TAG="${GITHUB_REF#refs/*/}"
32+ if [ -z "$RELEASE_TAG" ]; then
33+ echo "GITHUB_REF is empty, using github.event.release.tag_name: ${{ github.event.release.tag_name }}"
34+ RELEASE_TAG="${{ github.event.release.tag_name }}"
35+ fi
36+ echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
3137
3238 - name : Build agent go binary amd64
3339 run : UNAME_M=x86_64 VERSION=${RELEASE_TAG:-commit-$GITHUB_SHA} make kvisor-agent
@@ -123,7 +129,13 @@ jobs:
123129 fetch-depth : " 0"
124130
125131 - name : Get release tag
126- run : echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
132+ run : |
133+ RELEASE_TAG="${GITHUB_REF#refs/*/}"
134+ if [ -z "$RELEASE_TAG" ]; then
135+ echo "GITHUB_REF is empty, using github.event.release.tag_name: ${{ github.event.release.tag_name }}"
136+ RELEASE_TAG="${{ github.event.release.tag_name }}"
137+ fi
138+ echo "RELEASE_TAG=${RELEASE_TAG}" >> $GITHUB_ENV
127139
128140 - name : Checkout helm-charts
129141 # The cr tool only works if the target repository is already checked out
You can’t perform that action at this time.
0 commit comments