diff --git a/.github/workflows/maven-build-docker-image.yml b/.github/workflows/maven-build-docker-image.yml index f8ef04d93806..071b8c02da2e 100644 --- a/.github/workflows/maven-build-docker-image.yml +++ b/.github/workflows/maven-build-docker-image.yml @@ -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 @@ -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} @@ -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