Skip to content

Commit

Permalink
chore: update docker build workflow
Browse files Browse the repository at this point in the history
Keep the 'v' in app version so we are able to query to GitHub release api to fetch its
release information
  • Loading branch information
ngoduykhanh committed Jan 6, 2024
1 parent fa33d3f commit a22e807
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a22e807

Please sign in to comment.