tag
This commit is contained in:
@@ -2,8 +2,8 @@ name: Build and Deploy Versioned Spring Boot Server
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: # Match all tags
|
tags:
|
||||||
- "*"
|
- "*" # Match all tags
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -43,7 +43,11 @@ jobs:
|
|||||||
- name: Extract Tag Version
|
- name: Extract Tag Version
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
TAG_VERSION=${GITEA_REF#refs/tags/}
|
TAG_VERSION=$(echo "${GITEA_REF}" | sed 's#refs/tags/##')
|
||||||
|
if [ -z "$TAG_VERSION" ]; then
|
||||||
|
echo "Error: TAG_VERSION is empty."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
|
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
# 7. Build the Docker image with the tag
|
# 7. Build the Docker image with the tag
|
||||||
|
|||||||
Reference in New Issue
Block a user