Update CI.yml

This commit is contained in:
Alexey Pustovalov 2020-09-08 19:31:18 +03:00 committed by GitHub
parent 9b302b48b5
commit c4bd6cefe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ defaults:
jobs: jobs:
build: build:
env: env:
LATEST_BRANCH: "${{ github.event.repository.master_branch }}" LATEST_BRANCH: "${{ github.event.repository.default_branch }}"
DOCKER_REPOSITORY: "zabbix" DOCKER_REPOSITORY: "zabbix"
PUSH_IMAGES: "false" PUSH_IMAGES: "false"
strategy: strategy:
@ -174,6 +174,8 @@ jobs:
BUILDX_ARGS="${{ steps.prepare_push.outputs.buildx_args }}" BUILDX_ARGS="${{ steps.prepare_push.outputs.buildx_args }}"
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 }}"
else
exit 1
fi fi
docker buildx build --cache-to "type=local,dest=/tmp/.buildx-cache" \ docker buildx build --cache-to "type=local,dest=/tmp/.buildx-cache" \
@ -197,11 +199,9 @@ 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=false" \ --output "type=image,push=${{ env.PUSH_IMAGES }}" \
${BUILDX_ARGS} ${BUILDX_ARGS}
- name: Inspect images - name: Inspect images