mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-19 00:08:42 +02:00
Update CI.yml
This commit is contained in:
parent
5399507f16
commit
2b8d31844e
19
.github/workflows/CI.yml
vendored
19
.github/workflows/CI.yml
vendored
@ -25,6 +25,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
LATEST_BRANCH: "${{ github.event.repository.master_branch }}"
|
LATEST_BRANCH: "${{ github.event.repository.master_branch }}"
|
||||||
DOCKER_REPOSITORY: "zabbix"
|
DOCKER_REPOSITORY: "zabbix"
|
||||||
|
PUSH_IMAGES: "false"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -108,7 +109,7 @@ jobs:
|
|||||||
GIT_BRANCH="${{ github.ref }}"
|
GIT_BRANCH="${{ github.ref }}"
|
||||||
GIT_BRANCH=${GIT_BRANCH:11}
|
GIT_BRANCH=${GIT_BRANCH:11}
|
||||||
|
|
||||||
echo "::warning Branch - ${GIT_BRANCH}"
|
echo "::debug::Branch - ${GIT_BRANCH}"
|
||||||
|
|
||||||
if [ "${GIT_BRANCH}" == "trunk" ]; then
|
if [ "${GIT_BRANCH}" == "trunk" ]; then
|
||||||
TAGS_ARRAY+=("$IMAGE_NAME:${{ matrix.os }}-${GIT_BRANCH}")
|
TAGS_ARRAY+=("$IMAGE_NAME:${{ matrix.os }}-${GIT_BRANCH}")
|
||||||
@ -126,7 +127,7 @@ jobs:
|
|||||||
|
|
||||||
TAGS=$(printf -- "--tag %s " "${TAGS_ARRAY[@]}")
|
TAGS=$(printf -- "--tag %s " "${TAGS_ARRAY[@]}")
|
||||||
|
|
||||||
echo "::warning Tags - ${TAGS}"
|
echo "::debug::Tags - ${TAGS}"
|
||||||
|
|
||||||
echo ::set-output name=image_name::${IMAGE_NAME}
|
echo ::set-output name=image_name::${IMAGE_NAME}
|
||||||
echo ::set-output name=image_tag_versions::$(printf -- "|%s" "${TAGS_ARRAY[@]}")
|
echo ::set-output name=image_tag_versions::$(printf -- "|%s" "${TAGS_ARRAY[@]}")
|
||||||
@ -147,7 +148,7 @@ jobs:
|
|||||||
RELEASE_VERSION=${RELEASE_VERSION:10}
|
RELEASE_VERSION=${RELEASE_VERSION:10}
|
||||||
GIT_BRANCH=${RELEASE_VERSION%.*}
|
GIT_BRANCH=${RELEASE_VERSION%.*}
|
||||||
|
|
||||||
echo "::warning Release version ${RELEASE_VERSION}. Branch ${GIT_BRANCH}"
|
echo "::debug::Release version ${RELEASE_VERSION}. Branch ${GIT_BRANCH}"
|
||||||
|
|
||||||
TAGS_ARRAY+=("$IMAGE_NAME:${{ matrix.os }}-${RELEASE_VERSION}")
|
TAGS_ARRAY+=("$IMAGE_NAME:${{ matrix.os }}-${RELEASE_VERSION}")
|
||||||
|
|
||||||
@ -196,22 +197,24 @@ jobs:
|
|||||||
elif [ ! -z "${{ steps.prepare_release.outputs.buildx_args }}" ]; then
|
elif [ ! -z "${{ steps.prepare_release.outputs.buildx_args }}" ]; then
|
||||||
BUILDX_ARGS="${{ steps.prepare_release.outputs.buildx_args }}"
|
BUILDX_ARGS="${{ steps.prepare_release.outputs.buildx_args }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "::debug::push built images - ${{ env.PUSH_IMAGES }}"
|
||||||
|
|
||||||
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" \
|
docker buildx build --cache-from "type=local,src=/tmp/.buildx-cache" \
|
||||||
--output "type=image,push=true" \
|
--output "type=image,push=false" \
|
||||||
${BUILDX_ARGS}
|
${BUILDX_ARGS}
|
||||||
|
|
||||||
- name: Inspect images
|
- name: Inspect images
|
||||||
run: |
|
run: |
|
||||||
echo "::warning push - ${{ steps.prepare_push.outputs.buildx_args }}"
|
echo "::debug::push - ${{ steps.prepare_push.outputs.buildx_args }}"
|
||||||
echo "::warning release - ${{ steps.prepare_release.outputs.buildx_args }}"
|
echo "::debug::release - ${{ steps.prepare_release.outputs.buildx_args }}"
|
||||||
|
|
||||||
if [ ! -z "${{ steps.prepare_push.outputs.image_tag_versions }}" ]; then
|
if [ ! -z "${{ steps.prepare_push.outputs.image_tag_versions }}" ]; then
|
||||||
IMAGE_TAG_VERSIONS="${{ steps.prepare_push.outputs.image_tag_versions }}"
|
IMAGE_TAG_VERSIONS="${{ steps.prepare_push.outputs.image_tag_versions }}"
|
||||||
echo "::warning tags push raw - $IMAGE_TAG_VERSIONS"
|
echo "::debug::tags push raw - $IMAGE_TAG_VERSIONS"
|
||||||
elif [ ! -z "${{ steps.prepare_release.outputs.image_tag_versions }}" ]; then
|
elif [ ! -z "${{ steps.prepare_release.outputs.image_tag_versions }}" ]; then
|
||||||
IMAGE_TAG_VERSIONS="${{ steps.prepare_release.outputs.image_tag_versions }}"
|
IMAGE_TAG_VERSIONS="${{ steps.prepare_release.outputs.image_tag_versions }}"
|
||||||
echo "::warning tags release raw - $IMAGE_TAG_VERSIONS"
|
echo "::debug::tags release raw - $IMAGE_TAG_VERSIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
IMAGE_TAG_VERSIONS=${IMAGE_TAG_VERSIONS%%+(|)}
|
IMAGE_TAG_VERSIONS=${IMAGE_TAG_VERSIONS%%+(|)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user