Skip to content

Commit

Permalink
update docker image tags to LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
erickgonzalez committed May 8, 2024
1 parent f38dd74 commit 23c257d
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/maven-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ jobs:
build_id=${{ inputs.ref }}
is_trunk=false
if [[ "${build_id}" == 'master' || ${build_id} =~ ^v[0-9]{2}.[0-9]{2}.[0-9]{2}_lts$ ]]; then
if [[ "${build_id}" == 'master' || ${build_id} =~ release-[0-9]{2}.[0-9]{2}.[0-9]{2}_lts$ ]]; then
is_trunk=true
fi
is_lts=false
if [[ ${version} =~ ^[0-9]{2}.[0-9]{2}.[0-9]{2}_lts(_v[0-9]{1,2})?$ ]]; then
if [[ ${version} =~ ^[0-9]{2}.[0-9]{2}.[0-9]{2}_lts(_v[0-9]{1,2})?$ || ${build_id} =~ release-[0-9]{2}.[0-9]{2}.[0-9]{2}_lts$ ]]; then
is_lts=true
fi
Expand All @@ -162,20 +162,14 @@ jobs:
is_custom=false
is_trunk_snapshot=false
if [[ ${version} =~ ^[0-9]{1}.[0-9]{1}.[0-9]{1}-SNAPSHOT$ ]]; then
version=${build_id}
if [[ "${is_trunk}" == 'true' ]]; then
is_snapshot=true
if [[ "${is_trunk}" == 'true' ]]; then
is_trunk_snapshot=true
if [[ "${is_lts}" == 'true' ]]; then
# Add _lts to the version it will be used in the tag
version=${version}_lts
fi
elif [[ ${version} =~ ^[0-9]{2}.[0-9]{2}.[0-9]{2}$ ]]; then
is_release=true
is_latest=true
elif [[ ${version} =~ ^[0-9]{2}.[0-9]{2}.[0-9]{2}_lts$ ]]; then
is_snapshot=true
version=${build_id}
elif [[ ${version} =~ ^[0-9]{2}.[0-9]{2}.[0-9]{2}_lts_v[0-9]{1,2}$ ]]; then
is_release=true
is_release=true
else
is_custom=true
version=${build_id}
Expand All @@ -197,6 +191,9 @@ jobs:
echo "is_release=${is_release}"
echo "is_latest=${is_latest}"
echo "is_custom=${is_custom}"

# if build_id is release-*_lts should is_trunk = true, is_lts = true, is_snaphost = true generate docker images: version_lts_sha, version_lts_snapshot
# if version is xx.yy.zz_lts_vX is_lts = true, is_release = true generate docker images: version_lts_vX_sha, version_lts_vX

echo "version=${version}" >> $GITHUB_OUTPUT
echo "build_hash=${build_hash}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 23c257d

Please sign in to comment.