.github: use tag name as docker image name for new tags (#7233)

This commit is contained in:
Wei Zhou 2023-02-20 12:42:57 +01:00 committed by GitHub
parent 7484636997
commit bc5dbe95e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ jobs:
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
- name: Set Docker image TAG
run: echo "TAG=$(if [[ "${ACS_VERSION}" =~ .*-SNAPSHOT ]];then echo ${ACS_VERSION}-$(date +'%Y%m%d-%H%M%S');else echo ${ACS_VERSION};fi)" >> $GITHUB_ENV
run: echo "TAG=$(if [ "${{ github.ref_type }}" = "tag" ];then echo ${{ github.ref_name }}; elif [[ "${ACS_VERSION}" =~ .*-SNAPSHOT ]];then echo ${ACS_VERSION}-$(date +'%Y%m%d-%H%M%S');else echo ${ACS_VERSION};fi)" >> $GITHUB_ENV
- name: Set Docker image FULL TAG
run: echo "FULL_TAG=$(if [ "${{ secrets.DOCKER_REGISTRY }}" = "" ];then echo ${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};else echo ${{ secrets.DOCKER_REGISTRY }}/${DOCKER_REPOSITORY}/cloudstack-simulator:${TAG};fi)" >> $GITHUB_ENV