File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -39,16 +39,20 @@ jobs:
3939 username : ${{ secrets.DOCKER_HUB_USERNAME }}
4040 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
4141
42- - name : Compute release tag
42+ - name : Get and Set Release Version
4343 id : release_version
4444 run : |
45- if [[ "${GITHUB_REF#refs/heads/}" == "${GITHUB_REF}" ]]; then
46- VERSION="${GITHUB_REF#refs/*/}"
45+ if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
46+ VERSION="${GITHUB_REF#refs/tags/v}"
47+ elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
48+ VERSION="${GITHUB_REF#refs/tags/}"
49+ elif [[ "$GITHUB_REF" == refs/heads/* ]]; then
50+ VERSION="${GITHUB_REF#refs/heads/}"
4751 else
4852 VERSION="latest"
4953 fi
50- echo "RELEASE_VERSION=$VERSION" >> " $GITHUB_ENV"
51- echo "release_version=$VERSION" >> " $GITHUB_OUTPUT"
54+ echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
55+ echo "release_version=$VERSION" >> $GITHUB_OUTPUT
5256
5357 - name : Build and push Jupyter Hub image
5458 uses : docker/build-push-action@v6
Original file line number Diff line number Diff line change 3434 - name : Get and Set Release Version
3535 id : release_version
3636 run : |
37- if [[ "${GITHUB_REF#refs/heads/}" == "${GITHUB_REF}" ]]; then
38- VERSION="${GITHUB_REF#refs/*/}"
37+ if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
38+ VERSION="${GITHUB_REF#refs/tags/v}"
39+ elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
40+ VERSION="${GITHUB_REF#refs/tags/}"
41+ elif [[ "$GITHUB_REF" == refs/heads/* ]]; then
42+ VERSION="${GITHUB_REF#refs/heads/}"
3943 else
4044 VERSION="latest"
4145 fi
You can’t perform that action at this time.
0 commit comments