chore: update docker build workflow

Keep the 'v' in app version so we are able to query to GitHub release api to fetch its
release information
This commit is contained in:
Khanh Ngo 2024-01-06 10:09:46 +01:00
parent fa33d3f66e
commit a22e807d2a
No known key found for this signature in database
GPG key ID: 29077342AA5648F6

View file

@ -33,14 +33,13 @@ jobs:
##
if [[ '${{ github.ref }}' == *"refs/tags/"* ]]; then
github_tag="${GITHUB_REF#refs/*/}"
app_version=${github_tag}
SEMVER_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"
if [[ "$github_tag" =~ $SEMVER_REGEX ]]; then
github_tag=$(echo "${github_tag}" | sed 's/^v//')
fi
app_version=${github_tag}
container_images=$(cat <<END_HEREDOC
${base}:${github_tag}
END_HEREDOC