Prepare universal workflow

This commit is contained in:
Alexey Pustovalov 2024-02-10 17:42:20 +09:00
parent 69e6306ddc
commit c7e200a9ff

View File

@ -490,8 +490,8 @@ jobs:
BASE_IMAGE: ${{ env.BASE_BUILD_NAME }} BASE_IMAGE: ${{ env.BASE_BUILD_NAME }}
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }} IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
run: | run: |
BASE_TAG=$(cat "$BASE_IMAGE_$MATRIX_OS") BASE_TAG=$(cat "${BASE_IMAGE}_${MATRIX_OS}")
BUILD_BASE_IMAGE="$DOCKER_REPOSITORY/$IMAGES_PREFIX$BASE_IMAGE@${BASE_TAG}" BUILD_BASE_IMAGE="${DOCKER_REPOSITORY}/${IMAGES_PREFIX}${BASE_IMAGE}@${BASE_TAG}"
echo "::group::Base build image information" echo "::group::Base build image information"
echo "base_tag=${BASE_TAG}" echo "base_tag=${BASE_TAG}"
@ -787,7 +787,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.DOCKER_REPOSITORY }}/zabbix-${{ matrix.build }} images: ${{ env.DOCKER_REPOSITORY }}/${{ env.IMAGES_PREFIX}}${{ matrix.build }}
tags: | tags: |
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ matrix.os }}- type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},prefix=${{ matrix.os }}-
type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ matrix.os }} type=semver,enable=${{ needs.init_build.outputs.current_branch != 'trunk' }},pattern={{version}},suffix=-${{ matrix.os }}
@ -813,9 +813,10 @@ jobs:
BUILD_BASE: ${{ steps.build_base_image.outputs.build_base }} BUILD_BASE: ${{ steps.build_base_image.outputs.build_base }}
MATRIX_OS: ${{ matrix.os }} MATRIX_OS: ${{ matrix.os }}
DOCKER_REPOSITORY: ${{ env.DOCKER_REPOSITORY }} DOCKER_REPOSITORY: ${{ env.DOCKER_REPOSITORY }}
IMAGES_PREFIX: ${{ env.IMAGES_PREFIX }}
run: | run: |
BASE_TAG=$(cat "${BUILD_BASE}_${MATRIX_OS}") BASE_TAG=$(cat "${BUILD_BASE}_${MATRIX_OS}")
BUILD_BASE_IMAGE=$DOCKER_REPOSITORY/zabbix-$BUILD_BASE@${BASE_TAG} BUILD_BASE_IMAGE=${DOCKER_REPOSITORY}/${IMAGES_PREFIX}${BUILD_BASE}@${BASE_TAG}
echo "::group::Base build image information" echo "::group::Base build image information"
echo "base_tag=${BASE_TAG}" echo "base_tag=${BASE_TAG}"